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
GetId #
A leaf's index within its tree.
method : public : GetId() ~ IntReturn
| Type | Description |
|---|---|
| Int | leaf index; 0 for a node never numbered |
NewInternal # function
Creates an internal split node.
function : NewInternal(feature:Int, threshold:Float) ~ RegressionTreeNodeParameters
| Name | Type | Description |
|---|---|---|
| feature | Int | feature index to split on |
| threshold | Float | split threshold (<= goes left) |
Return
| Type | Description |
|---|---|
| RegressionTreeNode | internal node |
NewLeaf # function
Creates a leaf node.
function : NewLeaf(value:Float) ~ RegressionTreeNodeParameters
| Name | Type | Description |
|---|---|---|
| value | Float | mean target the leaf predicts |
Return
| Type | Description |
|---|---|
| RegressionTreeNode | leaf node |