summaryrefslogtreecommitdiff
path: root/examples/demo_OT_1D.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/demo_OT_1D.py')
-rw-r--r--examples/demo_OT_1D.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/examples/demo_OT_1D.py b/examples/demo_OT_1D.py
index b17f902..accf722 100644
--- a/examples/demo_OT_1D.py
+++ b/examples/demo_OT_1D.py
@@ -7,7 +7,6 @@ Created on Fri Oct 21 09:51:45 2016
import numpy as np
import matplotlib.pylab as pl
-
import ot
@@ -30,10 +29,8 @@ M/=M.max()
#%% plot the distributions
pl.figure(1)
-
pl.plot(x,a,'b',label='Source distribution')
pl.plot(x,b,'r',label='Target distribution')
-
pl.legend()
#%% plot distributions and loss matrix
@@ -41,7 +38,6 @@ pl.legend()
pl.figure(2)
ot.plot.otplot1D(a,b,M,'Cost matrix M')
-
#%% EMD
G0=ot.emd(a,b,M)
@@ -50,8 +46,8 @@ pl.figure(3)
ot.plot.otplot1D(a,b,G0,'OT matrix G0')
#%% Sinkhorn
-lambd=1e-3
+lambd=1e-3
Gs=ot.sinkhorn(a,b,M,lambd)
pl.figure(4)