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 53c7713

Browse filesBrowse files
sanjail3jeremiedbb
andauthored
DOC Update docs for KMeans (scikit-learn#25546)
Co-authored-by: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com>
1 parent 320e392 commit 53c7713
Copy full SHA for 53c7713

File tree

Expand file treeCollapse file tree

1 file changed

+6
-6
lines changed
Filter options
Expand file treeCollapse file tree

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`.
@@ -1208,8 +1208,8 @@ class KMeans(_BaseKMeans):
12081208
in terms of inertia. Several runs are recommended for sparse
12091209
high-dimensional problems (see :ref:`kmeans_sparse_high_dim`).
12101210
1211-
When `n_init='auto'`, the number of runs will be 10 if using
1212-
`init='random'`, and 1 if using `init='kmeans++'`.
1211+
When `n_init='auto'`, the number of runs depends on the value of init:
1212+
10 if using `init='random'`, 1 if using `init='kmeans++'`.
12131213
12141214
.. versionadded:: 1.2
12151215
Added 'auto' option for `n_init`.
@@ -1736,8 +1736,8 @@ class MiniBatchKMeans(_BaseKMeans):
17361736
recommended for sparse high-dimensional problems (see
17371737
:ref:`kmeans_sparse_high_dim`).
17381738
1739-
When `n_init='auto'`, the number of runs will be 3 if using
1740-
`init='random'`, and 1 if using `init='kmeans++'`.
1739+
When `n_init='auto'`, the number of runs depends on the value of init:
1740+
3 if using `init='random'`, 1 if using `init='kmeans++'`.
17411741
17421742
.. versionadded:: 1.2
17431743
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.