Class CategoricalSplit

Object
org.apache.spark.ml.tree.CategoricalSplit
All Implemented Interfaces:
Serializable, Split

public class CategoricalSplit extends Object implements 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 Details

    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • featureIndex

      public int featureIndex()
      Description copied from interface: Split
      Index of feature which this split tests
      Specified by:
      featureIndex in interface Split
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • 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