partition#

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

Divide the sample into consecutive segments of its sorted order.

Параметры:
  • X (UnivariateFloatArray) – One-dimensional sample of finite values; the caller ensures that it has at least k points.

  • k (int) – Number of clusters.

  • rng (numpy.random.Generator) – Not used.

Результат:

Matrix of shape (n, k). Column c is the c-th segment of the sorted sample in ascending order of the values.

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

MultivariateFloatArray