@@ -82,6 +82,26 @@ class KNeighborsClassifier(NeighborsBase, KNeighborsMixin,
82
82
for more details.
83
83
Doesn't affect :meth:`fit` method.
84
84
85
+ Attributes
86
+ ----------
87
+ classes_ : array of shape = (n_classes,)
88
+ Class labels known to the classifier
89
+
90
+ effective_metric_ : string or callble
91
+ The distance metric used. It will be same as the `metric` parameter
92
+ or a synonym of it, e.g. 'euclidean' if the `metric` parameter set to
93
+ 'minkowski' and `p` parameter set to 2.
94
+
95
+ effective_metric_params_ : dict
96
+ Additional keyword arguments for the metric function. For most metrics
97
+ will be same with `metric_params` parameter, but may also contain the
98
+ `p` parameter value if the `effective_metric_` attribute is set to
99
+ 'minkowski'.
100
+
101
+ outputs_2d_ : bool
102
+ False when `y`'s shape is (n_samples, ) or (n_samples, 1) during fit
103
+ otherwise True.
104
+
85
105
Examples
86
106
--------
87
107
>>> X = [[0], [1], [2], [3]]
@@ -296,6 +316,26 @@ class RadiusNeighborsClassifier(NeighborsBase, RadiusNeighborsMixin,
296
316
``-1`` means using all processors. See :term:`Glossary <n_jobs>`
297
317
for more details.
298
318
319
+ Attributes
320
+ ----------
321
+ classes_ : array of shape = (n_classes,)
322
+ Class labels known to the classifier.
323
+
324
+ effective_metric_ : string or callble
325
+ The distance metric used. It will be same as the `metric` parameter
326
+ or a synonym of it, e.g. 'euclidean' if the `metric` parameter set to
327
+ 'minkowski' and `p` parameter set to 2.
328
+
329
+ effective_metric_params_ : dict
330
+ Additional keyword arguments for the metric function. For most metrics
331
+ will be same with `metric_params` parameter, but may also contain the
332
+ `p` parameter value if the `effective_metric_` attribute is set to
333
+ 'minkowski'.
334
+
335
+ outputs_2d_ : bool
336
+ False when `y`'s shape is (n_samples, ) or (n_samples, 1) during fit
337
+ otherwise True.
338
+
299
339
Examples
300
340
--------
301
341
>>> X = [[0], [1], [2], [3]]
0 commit comments