File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -27,10 +27,8 @@ class NearestCentroid(BaseEstimator, ClassifierMixin):
27
27
metric: string, or callable
28
28
The metric to use when calculating distance between instances in a
29
29
feature array. If metric is a string or callable, it must be one of
30
- the options allowed by metrics.pairwise.calculate_distance for its
30
+ the options allowed by metrics.pairwise.pairwise_distances for its
31
31
metric parameter.
32
- If metric is "precomputed", X is assumed to be a distance matrix and
33
- must be square.
34
32
shrink_threshold : float, optional
35
33
Threshold for shrinking centroids to remove features.
36
34
@@ -145,6 +143,12 @@ def predict(self, X):
145
143
Returns
146
144
-------
147
145
C : array, shape = [n_samples]
146
+
147
+ Note
148
+ ----
149
+ If the metric constructor parameter is "precomputed", X is assumed to
150
+ be the distance matrix between the data to be predicted and
151
+ self.centroids_.
148
152
"""
149
153
X = atleast2d_or_csr (X )
150
154
if not hasattr (self , "centroids_" ):
You can’t perform that action at this time.
0 commit comments