ClassificationTree
class ClassificationTree(numClasses: Int, splitCandidates: List<SerializableSplit>, config: ClassificationTreeConfig = ClassificationTreeConfig(), concurrency: Concurrency = Concurrency.None, leafArmFactory: () -> SeriesStat<ClassCountsResult> = { ClassCountsStat(numClasses, concurrency) }, randomSeed: Int = 0)(source)
Classification mirror of RegressionTree: online VFDT decision tree where each leaf carries a per-class count accumulator and audit leaves track class counts per candidate split. Splits fire when a candidate clears the Hoeffding bound on the configured ClassificationSplitMetric (Gini or information gain).
Concurrency model matches RegressionTree: lock-free leaf updates, single split-conversion lock fired only at split-decision time.
Constructors
ClassificationTree
constructor(numClasses: Int, splitCandidates: List<SerializableSplit>, config: ClassificationTreeConfig = ClassificationTreeConfig(), concurrency: Concurrency = Concurrency.None, leafArmFactory: () -> SeriesStat<ClassCountsResult> = { ClassCountsStat(numClasses, concurrency) }, randomSeed: Int = 0)(source)
Properties
nodeCount
Functions
findLeaf
Walk to the leaf row resolves to.
merge
mergeSnapshot
Snapshot merge: same rules as merge but the other side is an immutable result.
predict
prettyPrint
Render the tree as nested if-else text.
probabilities
Probabilities at the leaf row resolves to.
reset
rootNode
Live root node, for snapshotting.
rootSnapshot
Aggregate class-count snapshot at the root, walking leaves and split carryovers.