@@ -22,11 +22,11 @@ class NeighborsClassifier(BaseEstimator, ClassifierMixin):
22
22
window_size : int, optional
23
23
Window size passed to BallTree
24
24
25
- strategy : {'auto', 'ball_tree', 'brute', 'inplace '}, optional
25
+ strategy : {'auto', 'ball_tree', 'brute', 'brute_inplace '}, optional
26
26
Strategy used to compute the nearest neighbors. 'ball_tree'
27
- will construct a BallTree, 'brute' and 'inplace ' will perform
28
- brute-force search.'auto' will guess the most appropriate based
29
- on current dataset.
27
+ will construct a BallTree, 'brute' and 'brute_inplace ' will
28
+ perform brute-force search.'auto' will guess the most
29
+ appropriate based on current dataset.
30
30
31
31
Examples
32
32
--------
@@ -160,7 +160,7 @@ def predict(self, X, **params):
160
160
161
161
# .. get neighbors ..
162
162
if self .ball_tree is None :
163
- if self .strategy == 'inplace ' :
163
+ if self .strategy == 'brute_inplace ' :
164
164
neigh_ind = knn_brute (self ._fit_X , X , self .n_neighbors )
165
165
else :
166
166
from .metrics import euclidean_distances
@@ -203,11 +203,11 @@ class NeighborsRegressor(NeighborsClassifier, RegressorMixin):
203
203
mode : {'mean', 'barycenter'}, optional
204
204
Weights to apply to labels.
205
205
206
- strategy : {'auto', 'ball_tree', 'brute', 'inplace '}, optional
206
+ strategy : {'auto', 'ball_tree', 'brute', 'brute_inplace '}, optional
207
207
Strategy used to compute the nearest neighbors. 'ball_tree'
208
- will construct a BallTree, 'brute' and 'inplace ' will perform
209
- brute-force search.'auto' will guess the most appropriate based
210
- on current dataset.
208
+ will construct a BallTree, 'brute' and 'brute_inplace ' will
209
+ perform brute-force search.'auto' will guess the most
210
+ appropriate based on current dataset.
211
211
212
212
Examples
213
213
--------
@@ -256,7 +256,7 @@ def predict(self, X, **params):
256
256
257
257
# .. get neighbors ..
258
258
if self .ball_tree is None :
259
- if self .strategy == 'inplace ' :
259
+ if self .strategy == 'brute_inplace ' :
260
260
neigh_ind = knn_brute (self ._fit_X , X , self .n_neighbors )
261
261
else :
262
262
from .metrics .pairwise import euclidean_distances
0 commit comments