partition#

SklearnPartitioner.partition(X, k, rng)[исходный код]#

Divide the sample into k clusters 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_state parameter.

Результат:

Partition matrix of shape (n, k); column c is the cluster of points with label c.

Тип результата:

MultivariateFloatArray