Package smile.base.cart
Class NominalSplit
java.lang.Object
smile.base.cart.Split
smile.base.cart.NominalSplit
The data about of a potential split for a leaf node.
-
Field Summary
Fields inherited from class smile.base.cart.Split
comparator
-
Constructor Summary
ConstructorDescriptionNominalSplit
(LeafNode leaf, int feature, int value, double score, int lo, int hi, int trueCount, int falseCount, IntPredicate predicate) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturns the lambda that tests on the split feature.Returns an internal node with the feature, value, and score of this split.
-
Constructor Details
-
NominalSplit
public NominalSplit(LeafNode leaf, int feature, int value, double score, int lo, int hi, int trueCount, int falseCount, IntPredicate predicate) Constructor.- Parameters:
leaf
- the node to split.feature
- the index of feature column.value
- the split value.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.predicate
- the lambda returns true if the sample passes the test on the split feature.
-
-
Method Details