BreakShiftRefiner

class BreakShiftRefiner(val maxShift: Int = defaultMaxShift, val maxIterations: Int = defaultMaxIterations, val criterion: MixtureCriterionIfc = MixtureBICCriterion(), val selector: FamilySelectorIfc = SeparableCMLSelector()) : PartitionRefinerIfc(source)

Improves a partition by moving one cut at a time to a nearby position, keeping any move that improves the criterion.

This is a coordinate descent over cut positions, generalizing the neighborhood the original prototype searched. The prototype shifted a fixed number of observations across one boundary at a time and evaluated the result once; this repeats until no single move helps, which is the least that can be called a search.

It is retained as a comparison tier rather than as a recommendation. The quantity it searches for has an exact solution: with the components fitted, the best contiguous assignment is computable directly, which is what the classification refiner does. The value of keeping this is that the difference between a local neighborhood search and an exact one can be measured rather than asserted.

Scoring a proposed partition means choosing families for its groups, and that choice is made separably. It has to be: a move is proposed for every admissible shift of every cut on every sweep, so the cost of scoring one partition is multiplied by a number that grows with the component count and the sample size. Enumerating the family combinations at each of those points raises the catalog size to the number of components inside the innermost loop, which is not a large constant but an intractable one — at eight components and a catalog of five it is nearly four hundred thousand mixtures per proposed move. Separable selection makes it linear in the catalog, which is what allows this tier to run at all.

Parameters

maxShift

the furthest a cut may move in a single step, in observations

maxIterations

the cap on complete sweeps over all cuts

criterion

the criterion a move must improve

selector

how families are chosen when a proposed partition is scored

Constructors

Link copied to clipboard
constructor(maxShift: Int = defaultMaxShift, maxIterations: Int = defaultMaxIterations, criterion: MixtureCriterionIfc = MixtureBICCriterion(), selector: FamilySelectorIfc = SeparableCMLSelector())

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val name: String

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

Link copied to clipboard

Functions

Link copied to clipboard
open override fun refine(sortedData: DoubleArray, initial: DataPartition, certificate: AdmissibilityCertificate, fitter: ComponentFitterIfc): RefinementResult

Refines the supplied partition.

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