Package org.apache.spark.ml.tree
Interface Split
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
CategoricalSplit
,ContinuousSplit
Interface for a "Split," which specifies a test made at a decision tree node
to choose the left or right path.
-
Method Summary
Modifier and TypeMethodDescriptionint
Index of feature which this split testsboolean
shouldGoLeft
(int binnedFeature, Split[] splits) Return true (split to left) or false (split to right).boolean
shouldGoLeft
(Vector features) Return true (split to left) or false (split to right).toOld()
Convert to old Split format
-
Method Details
-
featureIndex
int featureIndex()Index of feature which this split tests -
shouldGoLeft
Return true (split to left) or false (split to right).- Parameters:
features
- Vector of features (original values, not binned).- Returns:
- (undocumented)
-
shouldGoLeft
Return true (split to left) or false (split to right).- Parameters:
binnedFeature
- Binned feature value.splits
- All splits for the given feature.- Returns:
- (undocumented)
-
toOld
Split toOld()Convert to old Split format
-