summaryrefslogtreecommitdiff
path: root/ot/datasets.py
diff options
context:
space:
mode:
authorRémi Flamary <remi.flamary@gmail.com>2016-10-21 10:51:27 +0200
committerRémi Flamary <remi.flamary@gmail.com>2016-10-21 10:51:27 +0200
commit581c6de782dca279edd97778cc474e7597788c0f (patch)
tree760161e1c7812d8caf77bf8acc543453c6213e39 /ot/datasets.py
parent2109443f5bea396114d1f9e0563ba5c396378c57 (diff)
demo+sinkhorn
Diffstat (limited to 'ot/datasets.py')
-rw-r--r--ot/datasets.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/ot/datasets.py b/ot/datasets.py
new file mode 100644
index 0000000..bb10ba4
--- /dev/null
+++ b/ot/datasets.py
@@ -0,0 +1,10 @@
+
+import numpy as np
+
+
+
+def get_1D_gauss(n,m,s):
+ "return a 1D histogram for a gaussian distribution (n bins, mean m and std s) "
+ x=np.arange(n,dtype=np.float64)
+ h=np.exp(-(x-m)**2/(2*s^2))
+ return h/h.sum() \ No newline at end of file