Package org.apache.spark.ml.tree
Class CategoricalSplit
Object
org.apache.spark.ml.tree.CategoricalSplit
- All Implemented Interfaces:
Serializable
,Split
Split which tests a categorical feature.
param: featureIndex Index of the feature to test
param: _leftCategories If the feature value is in this set of categories, then the split goes
left. Otherwise, it goes right.
param: numCategories Number of categories for this feature.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionboolean
int
Index of feature which this split testsint
hashCode()
double[]
Get sorted categories which split to the leftint
double[]
Get sorted categories which split to the right
-
Method Details
-
equals
-
featureIndex
public int featureIndex()Description copied from interface:Split
Index of feature which this split tests- Specified by:
featureIndex
in interfaceSplit
-
hashCode
public int hashCode() -
leftCategories
public double[] leftCategories()Get sorted categories which split to the left -
numCategories
public int numCategories() -
rightCategories
public double[] rightCategories()Get sorted categories which split to the right
-