Package smile.base.cart
Class Split
java.lang.Object
smile.base.cart.Split
- Direct Known Subclasses:
NominalSplit
,OrdinalSplit
The data about of a potential split for a leaf node.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Comparator
<Split> The comparator on the split score. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract IntPredicate
Returns the lambda that tests on the split feature.abstract InternalNode
Returns an internal node with the feature, value, and score of this split.toString()
-
Field Details
-
comparator
The comparator on the split score.
-
-
Constructor Details
-
Split
public Split(LeafNode leaf, int feature, double score, int lo, int hi, int trueCount, int falseCount) Constructor.- Parameters:
leaf
- the node to split.feature
- the index of feature column.score
- the split score.lo
- the lower bound of sample index in the node.hi
- the upper bound of sample index in the node.trueCount
- the number of samples in true branch child.falseCount
- the number of samples false branch child.
-
-
Method Details
-
toNode
Returns an internal node with the feature, value, and score of this split.- Parameters:
trueChild
- the child node of true branch.falseChild
- the child node of false branch.- Returns:
- an internal node
-
predicate
Returns the lambda that tests on the split feature.- Returns:
- the lambda that tests on the split feature.
-
toString
-