summaryrefslogtreecommitdiff
path: root/examples/plot_gromov_barycenter.py
diff options
context:
space:
mode:
authorNicolas Courty <Nico@pc-mna-08.univ-ubs.fr>2017-08-31 17:17:30 +0200
committerNicolas Courty <Nico@pc-mna-08.univ-ubs.fr>2017-08-31 17:17:30 +0200
commitbc68cc3e8b23ad7d542518ba8ffa665094d57663 (patch)
treeee55d18a3788f831f1f6f27b1a4e1828a8b75d71 /examples/plot_gromov_barycenter.py
parent3007f1da1094f93fa4216386666085cf60316b04 (diff)
minor corrections
Diffstat (limited to 'examples/plot_gromov_barycenter.py')
-rwxr-xr-xexamples/plot_gromov_barycenter.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/examples/plot_gromov_barycenter.py b/examples/plot_gromov_barycenter.py
index 6a72b3b..da52768 100755
--- a/examples/plot_gromov_barycenter.py
+++ b/examples/plot_gromov_barycenter.py
@@ -32,18 +32,19 @@ that will be given by the output of the algorithm
"""
-def smacof_mds(C, dim, maxIter=3000, eps=1e-9):
+def smacof_mds(C, dim, max_iter=3000, eps=1e-9):
"""
Returns an interpolated point cloud following the dissimilarity matrix C using SMACOF
multidimensional scaling (MDS) in specific dimensionned target space
Parameters
----------
- C : np.ndarray(ns,ns)
+ C : ndarray, shape (ns, ns)
dissimilarity matrix
- dim : Integer
+ dim : int
dimension of the targeted space
- maxIter : Maximum number of iterations of the SMACOF algorithm for a single run
+ max_iter : int
+ Maximum number of iterations of the SMACOF algorithm for a single run
eps : relative tolerance w.r.t stress to declare converge
@@ -60,7 +61,7 @@ def smacof_mds(C, dim, maxIter=3000, eps=1e-9):
mds = manifold.MDS(
dim,
- max_iter=3000,
+ max_iter=max_iter,
eps=1e-9,
dissimilarity='precomputed',
n_init=1)
@@ -68,7 +69,7 @@ def smacof_mds(C, dim, maxIter=3000, eps=1e-9):
nmds = manifold.MDS(
2,
- max_iter=3000,
+ max_iter=max_iter,
eps=1e-9,
dissimilarity="precomputed",
random_state=seed,