8000 DOC Update example plot_nearest_centroid.py (#26263) · scikit-learn/scikit-learn@9670b42 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9670b42

Browse files
DOC Update example plot_nearest_centroid.py (#26263)
1 parent 7250c69 commit 9670b42

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

examples/neighbors/plot_nearest_centroid.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
from sklearn.neighbors import 9CC4 NearestCentroid
1616
from sklearn.inspection import DecisionBoundaryDisplay
1717

18-
n_neighbors = 15
1918

2019
# import some data to play with
2120
iris = datasets.load_iris()
@@ -29,7 +28,7 @@
2928
cmap_bold = ListedColormap(["darkorange", "c", "darkblue"])
3029

3130
for shrinkage in [None, 0.2]:
32-
# we create an instance of Neighbours Classifier and fit the data.
31+
# we create an instance of Nearest Centroid Classifier and fit the data.
3332
clf = NearestCentroid(shrink_threshold=shrinkage)
3433
clf.fit(X, y)
3534
y_pred = clf.predict(X)

0 commit comments

Comments
 (0)
0