Skip to content

Commit bc68cc3

Browse files
Nicolas CourtyNicolas Courty
authored andcommitted
minor corrections
1 parent 3007f1d commit bc68cc3

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

examples/plot_gromov_barycenter.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,19 @@
3232
"""
3333

3434

35-
def smacof_mds(C, dim, maxIter=3000, eps=1e-9):
35+
def smacof_mds(C, dim, max_iter=3000, eps=1e-9):
3636
"""
3737
Returns an interpolated point cloud following the dissimilarity matrix C using SMACOF
3838
multidimensional scaling (MDS) in specific dimensionned target space
3939
4040
Parameters
4141
----------
42-
C : np.ndarray(ns,ns)
42+
C : ndarray, shape (ns, ns)
4343
dissimilarity matrix
44-
dim : Integer
44+
dim : int
4545
dimension of the targeted space
46-
maxIter : Maximum number of iterations of the SMACOF algorithm for a single run
46+
max_iter : int
47+
Maximum number of iterations of the SMACOF algorithm for a single run
4748
4849
eps : relative tolerance w.r.t stress to declare converge
4950
@@ -60,15 +61,15 @@ def smacof_mds(C, dim, maxIter=3000, eps=1e-9):
6061

6162
mds = manifold.MDS(
6263
dim,
63-
max_iter=3000,
64+
max_iter=max_iter,
6465
eps=1e-9,
6566
dissimilarity='precomputed',
6667
n_init=1)
6768
pos = mds.fit(C).embedding_
6869

6970
nmds = manifold.MDS(
7071
2,
71-
max_iter=3000,
72+
max_iter=max_iter,
7273
eps=1e-9,
7374
dissimilarity="precomputed",
7475
random_state=seed,

0 commit comments

Comments
 (0)