Enum Class SplitRule

java.lang.Object
java.lang.Enum<SplitRule>
smile.base.cart.SplitRule
All Implemented Interfaces:
Serializable, Comparable<SplitRule>, Constable

public enum SplitRule extends Enum<SplitRule>
The criterion to choose variable to split instances.
  • Enum Constant Details

    • GINI

      public static final SplitRule GINI
      Used by the CART algorithm, Gini impurity is a measure of how often a randomly chosen element from the set would be incorrectly labeled if it were randomly labeled according to the distribution of labels in the subset. Gini impurity can be computed by summing the probability of each item being chosen times the probability of a mistake in categorizing that item. It reaches its minimum (zero) when all cases in the node fall into a single target category.
    • ENTROPY

      public static final SplitRule ENTROPY
      Used by the ID3, C4.5 and C5.0 tree generation algorithms.
    • CLASSIFICATION_ERROR

      public static final SplitRule CLASSIFICATION_ERROR
      Classification error.
  • Method Details

    • values

      public static SplitRule[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static SplitRule valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null