Skip to content

Commit 43b8e02

Browse files
rickieparkjeremiedbb
authored andcommitted
DOC fix typo in KMeans's param. (#25649)
1 parent 82f8ada commit 43b8e02

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

examples/cluster/plot_kmeans_digits.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def bench_k_means(kmeans, name, data, labels):
114114
#
115115
# We will compare three approaches:
116116
#
117-
# * an initialization using `kmeans++`. This method is stochastic and we will
117+
# * an initialization using `k-means++`. This method is stochastic and we will
118118
# run the initialization 4 times;
119119
# * a random initialization. This method is stochastic as well and we will run
120120
# the initialization 4 times;

examples/cluster/plot_kmeans_plusplus.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
)
2424
X = X[:, ::-1]
2525

26-
# Calculate seeds from kmeans++
26+
# Calculate seeds from k-means++
2727
centers_init, indices = kmeans_plusplus(X, n_clusters=4, random_state=0)
2828

2929
# Plot init seeds along side sample data

examples/cluster/plot_kmeans_stability_low_dim_dense.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
1111
The first plot shows the best inertia reached for each combination
1212
of the model (``KMeans`` or ``MiniBatchKMeans``), and the init method
13-
(``init="random"`` or ``init="kmeans++"``) for increasing values of the
13+
(``init="random"`` or ``init="k-means++"``) for increasing values of the
1414
``n_init`` parameter that controls the number of initializations.
1515
1616
The second plot demonstrates one single run of the ``MiniBatchKMeans``

sklearn/cluster/_kmeans.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ def k_means(
346346
n_init consecutive runs in terms of inertia.
347347
348348
When `n_init='auto'`, the number of runs depends on the value of init:
349-
10 if using `init='random'`, 1 if using `init='kmeans++'`.
349+
10 if using `init='random'`, 1 if using `init='k-means++'`.
350350
351351
.. versionadded:: 1.2
352352
Added 'auto' option for `n_init`.
@@ -1197,7 +1197,7 @@ class KMeans(_BaseKMeans):
11971197
high-dimensional problems (see :ref:`kmeans_sparse_high_dim`).
11981198
11991199
When `n_init='auto'`, the number of runs depends on the value of init:
1200-
10 if using `init='random'`, 1 if using `init='kmeans++'`.
1200+
10 if using `init='random'`, 1 if using `init='k-means++'`.
12011201
12021202
.. versionadded:: 1.2
12031203
Added 'auto' option for `n_init`.
@@ -1725,7 +1725,7 @@ class MiniBatchKMeans(_BaseKMeans):
17251725
:ref:`kmeans_sparse_high_dim`).
17261726
17271727
When `n_init='auto'`, the number of runs depends on the value of init:
1728-
3 if using `init='random'`, 1 if using `init='kmeans++'`.
1728+
3 if using `init='random'`, 1 if using `init='k-means++'`.
17291729
17301730
.. versionadded:: 1.2
17311731
Added 'auto' option for `n_init`.

0 commit comments

Comments
 (0)