summaryrefslogtreecommitdiff
path: root/ot/bregman.py
diff options
context:
space:
mode:
authorRémi Flamary <remi.flamary@gmail.com>2016-11-08 09:19:30 +0100
committerRémi Flamary <remi.flamary@gmail.com>2016-11-08 09:19:30 +0100
commit2ccba4bf4bd0a13f82ffeb34c05e97c80466a030 (patch)
treee5adf6fb907cd95413759a917b58e5a398af197c /ot/bregman.py
parentdb70a830756eb5d6a9c3d76fefc479b5a3daade6 (diff)
travis CI
Diffstat (limited to 'ot/bregman.py')
-rw-r--r--ot/bregman.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/ot/bregman.py b/ot/bregman.py
index 91c526a..568ead2 100644
--- a/ot/bregman.py
+++ b/ot/bregman.py
@@ -59,6 +59,7 @@ def sinkhorn(a,b, M, reg, numItermax = 1000, stopThr=1e-9, verbose=False, log=Fa
Examples
--------
+ >>> import ot
>>> a=[.5,.5]
>>> b=[.5,.5]
>>> M=[[0.,1.],[1.,0.]]
@@ -203,10 +204,11 @@ def sinkhorn_stabilized(a,b, M, reg, numItermax = 1000,tau=1e3, stopThr=1e-9,war
Examples
--------
+ >>> import ot
>>> a=[.5,.5]
>>> b=[.5,.5]
>>> M=[[0.,1.],[1.,0.]]
- >>> ot.sinkhorn(a,b,M,1)
+ >>> ot.bregman.sinkhorn_stabilized(a,b,M,1)
array([[ 0.36552929, 0.13447071],
[ 0.13447071, 0.36552929]])
@@ -394,10 +396,11 @@ def sinkhorn_epsilon_scaling(a,b, M, reg, numItermax = 100, epsilon0=1e4, numInn
Examples
--------
+ >>> import ot
>>> a=[.5,.5]
>>> b=[.5,.5]
>>> M=[[0.,1.],[1.,0.]]
- >>> ot.sinkhorn(a,b,M,1)
+ >>> ot.bregman.sinkhorn_epsilon_scaling(a,b,M,1)
array([[ 0.36552929, 0.13447071],
[ 0.13447071, 0.36552929]])