SplitMetric
Scores a candidate split against a leaf's pre-split distribution. Higher is better. Returned score must satisfy value(total, total, empty) == 0 so that "no signal" is always last in the ranking.
Ships VarianceReduction only; other metrics (t-test, chi-square, info gain) can be added as concrete callers ask for them. Sealed so the wire form (RegressionTreeConfig inside a tree spec) stays portable.
Inheritors
Functions
Link copied to clipboard
fun SplitMetric.rank(total: WeightedVarianceResult, pos: List<WeightedVarianceResult>, neg: List<WeightedVarianceResult>, minSamplesSplit: Double, minSamplesLeaf: Double): SplitInfo
Score every candidate split and return the top-2 + index. Splits that don't meet minSamplesLeaf on both sides or minSamplesSplit in total are skipped.
Link copied to clipboard
abstract fun score(total: WeightedVarianceResult, pos: WeightedVarianceResult, neg: WeightedVarianceResult): Double
Score a candidate split given its total / pos / neg variance snapshots.
score
abstract fun score(total: WeightedVarianceResult, pos: WeightedVarianceResult, neg: WeightedVarianceResult): Double(source)
Score a candidate split given its total / pos / neg variance snapshots.