summaryrefslogtreecommitdiff
path: root/examples/plot_gromov_barycenter.py
diff options
context:
space:
mode:
authorNicolas Courty <Nico@pc-mna-08.univ-ubs.fr>2017-09-12 18:07:17 +0200
committerNicolas Courty <Nico@pc-mna-08.univ-ubs.fr>2017-09-12 18:07:17 +0200
commit36bf599552ff15d1ca1c6b505507e65a333fa55e (patch)
tree8d508e9800bffef8c008c0872e46081c423d75dd /examples/plot_gromov_barycenter.py
parent8ea74ad41d660629a12f7d8d0d8816a23d385a92 (diff)
Corrections on Gromov
Diffstat (limited to 'examples/plot_gromov_barycenter.py')
-rwxr-xr-xexamples/plot_gromov_barycenter.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/examples/plot_gromov_barycenter.py b/examples/plot_gromov_barycenter.py
index 4f17117..c138031 100755
--- a/examples/plot_gromov_barycenter.py
+++ b/examples/plot_gromov_barycenter.py
@@ -48,13 +48,10 @@ def smacof_mds(C, dim, max_iter=3000, eps=1e-9):
eps : float
relative tolerance w.r.t stress to declare converge
-
Returns
-------
npos : ndarray, shape (R, dim)
Embedded coordinates of the interpolated point cloud (defined with one isometry)
-
-
"""
rng = np.random.RandomState(seed=3)
@@ -91,12 +88,12 @@ def im2mat(I):
return I.reshape((I.shape[0] * I.shape[1], I.shape[2]))
-square = spi.imread('../data/carre.png').astype(np.float64) / 256
-circle = spi.imread('../data/rond.png').astype(np.float64) / 256
-triangle = spi.imread('../data/triangle.png').astype(np.float64) / 256
-arrow = spi.imread('../data/coeur.png').astype(np.float64) / 256
+square = spi.imread('../data/square.png').astype(np.float64)[:,:,2] / 256
+cross = spi.imread('../data/cross.png').astype(np.float64)[:,:,2] / 256
+triangle = spi.imread('../data/triangle.png').astype(np.float64)[:,:,2] / 256
+star = spi.imread('../data/star.png').astype(np.float64)[:,:,2] / 256
-shapes = [square, circle, triangle, arrow]
+shapes = [square, cross, triangle, star]
S = 4
xs = [[] for i in range(S)]