RandomCentersPartitioner#
- class RandomCentersPartitioner[исходный код]#
Базовые классы:
PartitionerDraws centers from the distinct values of the sample and assigns points to the nearest center.
Without replacement,
kdistinct values of the sample become the centers. Every point belongs to the center nearest by absolute distance; when distances are equal, the center with the smaller column number is chosen. Unlike k-means, the centers are not refined. Every center is itself a point of the sample and lies in its own cluster, so no cluster is empty. The method is a cheap source of different partitions for a multistart.Methods
partition(X, k, rng)Divide the sample between randomly drawn centers.