Skip to content

Commit aa53fdb

Browse files
committed
DOC specify X shape for precomputed
+PEP8
1 parent 4698481 commit aa53fdb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

sklearn/manifold/mds.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ def smacof(similarities, metric=True, n_components=2, init=None, n_init=8,
274274
else:
275275
return best_pos, best_stress
276276

277+
277278
class MDS(BaseEstimator):
278279
"""Multidimensional scaling
279280
@@ -366,7 +367,8 @@ def fit(self, X, init=None, y=None):
366367
367368
Parameters
368369
----------
369-
X : array, shape=[n_samples, n_features]
370+
X : array, shape=[n_samples, n_features], or [n_samples, n_samples] \
371+
if dissimilarity='precomputed'
370372
Input data.
371373
372374
init : {None or ndarray, shape (n_samples,)}, optional
@@ -382,7 +384,8 @@ def fit_transform(self, X, init=None, y=None):
382384
383385
Parameters
384386
----------
385-
X : array, shape=[n_samples, n_features]
387+
X : array, shape=[n_samples, n_features], or [n_samples, n_samples] \
388+
if dissimilarity='precomputed'
386389
Input data.
387390
388391
init : {None or ndarray, shape (n_samples,)}, optional

0 commit comments

Comments
 (0)