v2026.6.1
All Bundles
Bundle Core machine learning types: the seedable Random generator, Matrix2D linear algebra and activations, matrix reference holders, the NeuralNetwork and CSV-backed MatrixReader. Compile with -lib ml.

RegressionTreeNode

A node in a RegressionTree: either a leaf carrying a mean prediction, or an internal node splitting a numeric feature at a threshold (<= left).

Operations

NewInternal # function

Creates an internal split node.

function : NewInternal(feature:Int, threshold:Float) ~ RegressionTreeNode

Parameters

NameTypeDescription
featureIntfeature index to split on
thresholdFloatsplit threshold (<= goes left)

Return

TypeDescription
RegressionTreeNodeinternal node

NewLeaf # function

Creates a leaf node.

function : NewLeaf(value:Float) ~ RegressionTreeNode

Parameters

NameTypeDescription
valueFloatmean target the leaf predicts

Return

TypeDescription
RegressionTreeNodeleaf node