https://github.com/blegat/mathoptsetdistances.jl
Distances to sets for MathOptInterface
Science Score: 10.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
○DOI references
-
✓Academic publication links
Links to: zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (7.1%) to scientific vocabulary
Last synced: 10 months ago
·
JSON representation
Repository
Distances to sets for MathOptInterface
Basic Info
- Host: GitHub
- Owner: blegat
- License: mit
- Default Branch: master
- Size: 181 KB
Statistics
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
- Releases: 0
Fork of matbesancon/MathOptSetDistances.jl
Created almost 4 years ago
· Last pushed almost 4 years ago
https://github.com/blegat/MathOptSetDistances.jl/blob/master/
# MathOptSetDistances [](https://github.com/matbesancon/MathOptSetDistances.jl/actions) [](https://codecov.io/gh/matbesancon/MathOptSetDistances.jl) [](https://zenodo.org/badge/latestdoi/265924605) Set of functions to compute distances and projections to sets defined in [MathOptInterface.jl](https://github.com/jump-dev/MathOptInterface.jl). ## Distance to set `set_distance(d::D, v::V, s::S)` defines the distance of a point `v` to a set `s`. The distance is always 0 if `v s`. `S` is a `MOI.AbstractSet`, `v` is a scalar or vector value and `d` a type of distance that is a subtype of `AbstractDistance`. New sets should implement at least `set_distance(::DefaultDistance, v::V, s::MySet)`. ## Projection on set `projection_on_set(d::D, v, s::S)` returns the point on `S` that is closest to `v` with respect to the distance `d`. `projection_gradient_on_set` returns the gradient of this projection, i.e. the transpose of the Jacobian. ## Gradients as ChainRules Gradients `projection_gradient_on_set` eagerly computes the full derivative matrix. This is often simpler to test and implement, but leads to unnecessary allocations and expensive operations. They are also implemented using [ChainRulesCore.jl](https://github.com/JuliaDiff/ChainRulesCore.jl) methods `rrule` and `frule`. Both methods should be implemented for each derivative and tested against `projection_gradient_on_set` and `FiniteDifferences.jl`. ## Special matrix types When some gradients or projections have structural zeros (sparsity patterns), they can and should return non-standard matrices including `FillArrays` `Zeros, Eyes, Ones, Fill`, sparse arrays and `LinearAlgebra.Diagonal`.
Owner
- Name: Benoît Legat
- Login: blegat
- Kind: user
- Location: Boston, MA, USA
- Company: LIDS, MIT
- Website: blegat.github.io
- Repositories: 48
- Profile: https://github.com/blegat