Skip to content

Commit

Permalink
Refactor sinkhorn and sinkhorn2 (#100)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
devmotion and github-actions[bot] authored Jun 27, 2021
1 parent a2224ee commit f03b05c
Show file tree
Hide file tree
Showing 21 changed files with 1,643 additions and 1,094 deletions.
4 changes: 3 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "OptimalTransport"
uuid = "7e02d93a-ae51-4f58-b602-d97af76e3b33"
authors = ["zsteve <stephenz@student.unimelb.edu.au>"]
version = "0.3.11"
version = "0.3.12"

[deps]
Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7"
Expand All @@ -10,6 +10,7 @@ IterativeSolvers = "42fd0dbc-a981-5370-80f2-aaf504508153"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
LogExpFunctions = "2ab3a3ac-af41-5b50-aa03-7779005ae688"
MathOptInterface = "b8f27783-ece8-5eb3-8dc8-9495eed66fee"
NNlib = "872c559c-99b0-510c-b3b7-b6c96a88d5cd"
PDMats = "90014a1f-27ba-587c-ab20-58faa44d9150"
QuadGK = "1fd47b50-473d-5c70-9696-f719f8f3bcdc"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
Expand All @@ -21,6 +22,7 @@ Distributions = "0.24, 0.25"
IterativeSolvers = "0.8.4, 0.9"
LogExpFunctions = "0.2"
MathOptInterface = "0.9"
NNlib = "0.6, 0.7"
PDMats = "0.11"
QuadGK = "2"
StatsBase = "0.33.8"
Expand Down
19 changes: 17 additions & 2 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,33 @@ squared2wasserstein
```@docs
sinkhorn
sinkhorn2
sinkhorn_stabilized_epsscaling
sinkhorn_stabilized
sinkhorn_barycenter
```

Currently the following variants of the Sinkhorn algorithm are supported:

```@docs
SinkhornGibbs
SinkhornStabilized
SinkhornEpsilonScaling
```

The following methods are deprecated and will be removed:

```@docs
sinkhorn_stabilized
sinkhorn_stabilized_epsscaling
```

## Unbalanced optimal transport

```@docs
sinkhorn_unbalanced
sinkhorn_unbalanced2
```

## Quadratically regularised optimal transport

```@docs
quadreg
```
9 changes: 9 additions & 0 deletions src/OptimalTransport.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ using MathOptInterface
using Distributions
using PDMats
using QuadGK
using NNlib: NNlib
using StatsBase: StatsBase

export SinkhornGibbs, SinkhornStabilized, SinkhornEpsilonScaling

export sinkhorn, sinkhorn2
export emd, emd2
export sinkhorn_stabilized, sinkhorn_stabilized_epsscaling, sinkhorn_barycenter
Expand All @@ -27,8 +30,14 @@ include("distances/bures.jl")
include("utils.jl")
include("exact.jl")
include("wasserstein.jl")

include("entropic/sinkhorn.jl")
include("entropic/sinkhorn_gibbs.jl")
include("entropic/sinkhorn_stabilized.jl")
include("entropic/sinkhorn_epsscaling.jl")
include("entropic/sinkhorn_unbalanced.jl")
include("entropic/sinkhorn_barycenter.jl")

include("quadratic.jl")

end
Loading

2 comments on commit f03b05c

@devmotion
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/39728

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.3.12 -m "<description of version>" f03b05c4062b6bec89dded05c4f857b798369cc3
git push origin v0.3.12

Please sign in to comment.