10000 DOC Added extra documentation in MiniBatchKMean for reassignment_rati… · kasmith11/scikit-learn@ba496d8 · GitHub
[go: up one dir, main page]

Skip to content

Commit ba496d8

Browse files
DOC Added extra documentation in MiniBatchKMean for reassignment_ratio (scikit-learn#23975)
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
1 parent e5c7fb1 commit ba496d8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

sklearn/cluster/_kmeans.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1802,6 +1802,12 @@ class MiniBatchKMeans(_BaseKMeans):
18021802
-----
18031803
See https://www.eecs.tufts.edu/~dsculley/papers/fastkmeans.pdf
18041804
1805+
When there are too few points in the dataset, some centers may be
1806+
duplicated, which means that a proper clustering in terms of the number
1807+
of requesting clusters and the number of returned clusters will not
1808+
always match. One solution is to set `reassignment_ratio=0`, which
1809+
prevents reassignments of clusters that are too small.
1810+
18051811
Examples
18061812
--------
18071813
>>> from sklearn.cluster import MiniBatchKMeans

0 commit comments

Comments
 (0)
0