partition#
- RandomCentersPartitioner.partition(X, k, rng)[исходный код]#
Divide the sample between randomly drawn centers.
- Параметры:
X (UnivariateFloatArray) – One-dimensional sample of finite values; the caller ensures that it has at least
kdistinct values.k (int) – Number of clusters.
rng (numpy.random.Generator) – Generator from which the centers are drawn.
- Результат:
Partition matrix of shape
(n, k); columnjis the cluster of thej-th drawn center.- Тип результата:
MultivariateFloatArray