@@ -994,20 +994,17 @@ def pairwise_distances(X, Y=None, metric="euclidean", n_jobs=1, **kwds):
994
994
If Y is given (default is None), then the returned matrix is the pairwise
995
995
distance between the arrays from both X and Y.
996
996
997
- Please note that support for sparse matrices is currently limited to
998
- 'euclidean', 'l2' and 'cosine'.
999
-
1000
997
Valid values for metric are:
1001
998
1002
- - from scikit-learn: ['cityblock', 'cosine', 'euclidean', 'l1', 'l2',
1003
- 'manhattan']
999
+ - From scikit-learn: ['cityblock', 'cosine', 'euclidean', 'l1', 'l2',
1000
+ 'manhattan']. These metrics support sparse matrix inputs.
1004
1001
1005
- - from scipy.spatial.distance: ['braycurtis', 'canberra', 'chebyshev',
1002
+ - From scipy.spatial.distance: ['braycurtis', 'canberra', 'chebyshev',
1006
1003
'correlation', 'dice', 'hamming', 'jaccard', 'kulsinski', 'mahalanobis',
1007
1004
'matching', 'minkowski', 'rogerstanimoto', 'russellrao', 'seuclidean',
1008
1005
'sokalmichener', 'sokalsneath', 'sqeuclidean', 'yule']
1009
1006
See the documentation for scipy.spatial.distance for details on these
1010
- metrics.
1007
+ metrics. These metrics do not support sparse matrix inputs.
1011
1008
1012
1009
Note that in the case of 'cityblock', 'cosine' and 'euclidean' (which are
1013
1010
valid scipy.spatial.distance metrics), the scikit-learn implementation
0 commit comments