summaryrefslogtreecommitdiff
path: root/examples/plot_UOT_barycenter_1D.py
diff options
context:
space:
mode:
authorHicham Janati <hicham.janati@inria.fr>2019-06-18 22:26:48 +0200
committerHicham Janati <hicham.janati@inria.fr>2019-06-18 22:26:48 +0200
commitadf9d046445bf142a29d914352f397b36f7905c0 (patch)
treee13c7231390288fafd6eb09702db1cde6521a81f /examples/plot_UOT_barycenter_1D.py
parent897982718a5fd81a9a591d80a7d50839399fc088 (diff)
update Readme + minor rendering in examples
Diffstat (limited to 'examples/plot_UOT_barycenter_1D.py')
-rw-r--r--examples/plot_UOT_barycenter_1D.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/plot_UOT_barycenter_1D.py b/examples/plot_UOT_barycenter_1D.py
index 8dfb84f..c8d9d3b 100644
--- a/examples/plot_UOT_barycenter_1D.py
+++ b/examples/plot_UOT_barycenter_1D.py
@@ -27,7 +27,7 @@ from matplotlib.collections import PolyCollection
# Generate data
# -------------
-#%% parameters
+# parameters
n = 100 # nb bins
@@ -53,7 +53,7 @@ M /= M.max()
# Plot data
# ---------
-#%% plot the distributions
+# plot the distributions
pl.figure(1, figsize=(6.4, 3))
for i in range(n_distributions):
@@ -65,7 +65,7 @@ pl.tight_layout()
# Barycenter computation
# ----------------------
-#%% non weighted barycenter computation
+# non weighted barycenter computation
weight = 0.5 # 0<=weight<=1
weights = np.array([1 - weight, weight])
@@ -97,7 +97,7 @@ pl.tight_layout()
# Barycentric interpolation
# -------------------------
-#%% barycenter interpolation
+# barycenter interpolation
n_weight = 11
weight_list = np.linspace(0, 1, n_weight)
@@ -114,7 +114,7 @@ for i in range(0, n_weight):
B_wass[:, i] = ot.unbalanced.barycenter_unbalanced(A, M, reg, alpha, weights)
-#%% plot interpolation
+# plot interpolation
pl.figure(3)