Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit dc61778

Browse filesBrowse files
sanjail3jeremiedbb
andcommitted
DOC Update docs for KMeans (#25546)
Co-authored-by: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com>
1 parent 4036d1a commit dc61778
Copy full SHA for dc61778

File tree

1 file changed

+6
-6
lines changed
Filter options

1 file changed

+6
-6
lines changed

‎sklearn/cluster/_kmeans.py

Copy file name to clipboardExpand all lines: sklearn/cluster/_kmeans.py
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -345,8 +345,8 @@ def k_means(
345345
centroid seeds. The final results will be the best output of
346346
n_init consecutive runs in terms of inertia.
347347
348-
When `n_init='auto'`, the number of runs will be 10 if using
349-
`init='random'`, and 1 if using `init='kmeans++'`.
348+
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++'`.
350350
351351
.. versionadded:: 1.2
352352
Added 'auto' option for `n_init`.
@@ -1196,8 +1196,8 @@ class KMeans(_BaseKMeans):
11961196
in terms of inertia. Several runs are recommended for sparse
11971197
high-dimensional problems (see :ref:`kmeans_sparse_high_dim`).
11981198
1199-
When `n_init='auto'`, the number of runs will be 10 if using
1200-
`init='random'`, and 1 if using `init='kmeans++'`.
1199+
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++'`.
12011201
12021202
.. versionadded:: 1.2
12031203
Added 'auto' option for `n_init`.
@@ -1724,8 +1724,8 @@ class MiniBatchKMeans(_BaseKMeans):
17241724
recommended for sparse high-dimensional problems (see
17251725
:ref:`kmeans_sparse_high_dim`).
17261726
1727-
When `n_init='auto'`, the number of runs will be 3 if using
1728-
`init='random'`, and 1 if using `init='kmeans++'`.
1727+
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++'`.
17291729
17301730
.. versionadded:: 1.2
17311731
Added 'auto' option for `n_init`.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.