KMeansPartitioner#
- class KMeansPartitioner(max_iter=100)[исходный код]#
Базовые классы:
PartitionerPartitions a sample by one run of k-means with k-means++ initial centers.
The run is single rather than the best of several: repeated runs with different randomness are the responsibility of a multistart.
- Параметры:
max_iter (int or numpy.integer, default=100) – Number of iterations. Exactly this many iterations are performed and convergence is not checked. The default is 100 because the default ten iterations of
kmeans2are often not enough.- Переменные:
max_iter (int) – Number of iterations passed to
kmeans2.- Исключение:
ValueError – If
max_iteris not a positive integer.
Methods
partition(X, k, rng)Divide the sample into
kclusters by one k-means run.