partition#
- SklearnPartitioner.partition(X, k, rng)[исходный код]#
Divide the sample into
kclusters by the scikit-learn clusterer.The method raises no errors of its own: errors of the clusterer pass through unchanged, and a cluster without points gives an empty column.
- Параметры:
X (UnivariateFloatArray) – One-dimensional sample of finite values; it is passed to the clusterer as one feature column.
k (int) – Number of clusters.
rng (numpy.random.Generator) – Generator from which an integer seed is drawn for a clusterer with a
random_stateparameter.
- Результат:
Partition matrix of shape
(n, k); columncis the cluster of points with labelc.- Тип результата:
MultivariateFloatArray