QuantilePartitioner#

class QuantilePartitioner[исходный код]#

Базовые классы: Partitioner

Divides the sorted sample into consecutive segments with equal numbers of points.

The sample is sorted in stable order, and the sorted order is cut into k consecutive segments. Segment sizes follow numpy.array_split: they differ by at most one point, and the first n mod k segments are one point longer. Column c of the partition is the c-th segment in ascending order of the values. Equal values at a boundary fall into neighboring clusters; the boundary is not shifted. The method is deterministic and does not use the generator, so repeating it in a multistart is useless.

Methods

partition(X, k, rng)

Divide the sample into consecutive segments of its sorted order.