org.apache.spark.ml.tree
Class CategoricalSplit

Object
  extended by org.apache.spark.ml.tree.CategoricalSplit
All Implemented Interfaces:
java.io.Serializable, Split

public final class CategoricalSplit
extends Object
implements Split

:: DeveloperApi :: 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:
Serialized Form

Method Summary
 boolean equals(Object o)
           
 int featureIndex()
          Index of feature which this split tests
 double[] leftCategories()
          Get sorted categories which split to the left
 double[] rightCategories()
          Get sorted categories which split to the right
 
Methods inherited from class Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

featureIndex

public int featureIndex()
Description copied from interface: Split
Index of feature which this split tests

Specified by:
featureIndex in interface Split

equals

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

leftCategories

public double[] leftCategories()
Get sorted categories which split to the left


rightCategories

public double[] rightCategories()
Get sorted categories which split to the right