Skip to content

Commit 0fd64c2

Browse files
committed
DOC: mark weights as optional
1 parent c440190 commit 0fd64c2

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

sklearn/neighbors/classification.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class KNeighborsClassifier(NeighborsBase, KNeighborsMixin,
2929
n_neighbors : int, optional (default = 5)
3030
Number of neighbors to use by default for :meth:`k_neighbors` queries.
3131
32-
weights : str or callable
32+
weights : str or callable, optional (default = 'uniform')
3333
weight function used in prediction. Possible values:
3434
3535
- 'uniform' : uniform weights. All points in each neighborhood
@@ -41,8 +41,6 @@ class KNeighborsClassifier(NeighborsBase, KNeighborsMixin,
4141
array of distances, and returns an array of the same shape
4242
containing the weights.
4343
44-
Uniform weights are used by default.
45-
4644
algorithm : {'auto', 'ball_tree', 'kd_tree', 'brute'}, optional
4745
Algorithm used to compute the nearest neighbors:
4846

0 commit comments

Comments
 (0)