summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/plot_gromov.py3
-rwxr-xr-xexamples/plot_gromov_barycenter.py10
2 files changed, 7 insertions, 6 deletions
diff --git a/examples/plot_gromov.py b/examples/plot_gromov.py
index dce66c4..5132024 100644
--- a/examples/plot_gromov.py
+++ b/examples/plot_gromov.py
@@ -3,6 +3,7 @@
==========================
Gromov-Wasserstein example
==========================
+
This example is designed to show how to use the Gromov-Wassertsein distance
computation in POT.
"""
@@ -15,7 +16,7 @@ computation in POT.
import scipy as sp
import numpy as np
import matplotlib.pylab as pl
-
+from mpl_toolkits.mplot3d import Axes3D # noqa
import ot
diff --git a/examples/plot_gromov_barycenter.py b/examples/plot_gromov_barycenter.py
index 52f4966..93533c0 100755
--- a/examples/plot_gromov_barycenter.py
+++ b/examples/plot_gromov_barycenter.py
@@ -3,6 +3,7 @@
=====================================
Gromov-Wasserstein Barycenter example
=====================================
+
This example is designed to show how to use the Gromov-Wasserstein distance
computation in POT.
"""
@@ -24,7 +25,6 @@ from sklearn.decomposition import PCA
import ot
"""
-
Smacof MDS
==========
This function allows to find an embedding of points given a dissimilarity matrix
@@ -134,28 +134,28 @@ for i in range(2):
Ct01[i] = ot.gromov.gromov_barycenters(n_samples, [Cs[0], Cs[1]],
[ps[0], ps[1]
], p, lambdast[i], 'square_loss', 5e-4,
- max_iter=100, stopThr=1e-3)
+ max_iter=100, tol=1e-3)
Ct02 = [0 for i in range(2)]
for i in range(2):
Ct02[i] = ot.gromov.gromov_barycenters(n_samples, [Cs[0], Cs[2]],
[ps[0], ps[2]
], p, lambdast[i], 'square_loss', 5e-4,
- max_iter=100, stopThr=1e-3)
+ max_iter=100, tol=1e-3)
Ct13 = [0 for i in range(2)]
for i in range(2):
Ct13[i] = ot.gromov.gromov_barycenters(n_samples, [Cs[1], Cs[3]],
[ps[1], ps[3]
], p, lambdast[i], 'square_loss', 5e-4,
- max_iter=100, stopThr=1e-3)
+ max_iter=100, tol=1e-3)
Ct23 = [0 for i in range(2)]
for i in range(2):
Ct23[i] = ot.gromov.gromov_barycenters(n_samples, [Cs[2], Cs[3]],
[ps[2], ps[3]
], p, lambdast[i], 'square_loss', 5e-4,
- max_iter=100, stopThr=1e-3)
+ max_iter=100, tol=1e-3)
"""
Visualization