QuantilePartitionGenerator

Partitions sorted data into groups of as nearly equal count as the value structure permits, by placing each cut at the admissible position closest to the corresponding sample quantile.

This exists as a baseline. It uses no information about the shape of the data, so comparing a fitted result initialized this way against one initialized by a shape-aware generator isolates how much the initialization contributes. It is also the natural fallback when a shape-aware generator fails.

Cuts are snapped to admissible positions and then repaired left to right so that every group meets the size and distinct-value requirements. When the requirements cannot be met, null is returned rather than a partition that the caller would have to validate.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
open override val name: String

A short name identifying the generator, suitable for use as a factor level when results are recorded.

Functions

Link copied to clipboard
open override fun generate(sortedData: DoubleArray, numGroups: Int, certificate: AdmissibilityCertificate): DataPartition?

Generates a partition of the supplied sorted data into the requested number of groups, or returns null when no partition satisfying the certificate can be produced.

Link copied to clipboard
open override fun toString(): String