Enum Class DecisionTreeInfoGain.GainCriteria

java.lang.Object
java.lang.Enum<DecisionTreeInfoGain.GainCriteria>
com.imsl.datamining.decisionTree.DecisionTreeInfoGain.GainCriteria
All Implemented Interfaces:
Serializable, Comparable<DecisionTreeInfoGain.GainCriteria>, java.lang.constant.Constable
Enclosing class:
DecisionTreeInfoGain

public static enum DecisionTreeInfoGain.GainCriteria extends Enum<DecisionTreeInfoGain.GainCriteria>
Specifies which information gain criteria to use in determining the best split at each node.
  • Enum Constant Details

    • SHANNON_ENTROPY

      public static final DecisionTreeInfoGain.GainCriteria SHANNON_ENTROPY
      A measure of randomness or uncertainty.

      For a categorical variable having \(C\) distinct values over a data set \(S\), the Shannon Entropy is defined as $$\sum_{i=1}^{C}p_i\log(p_i)$$ where $$p_i = Pr(Y=i)$$ and where $$p_i \log(p_i) := 0$$ if \(p_i=0\).

    • GINI_INDEX

      public static final DecisionTreeInfoGain.GainCriteria GINI_INDEX
      A measure of statistical dispersion.

      For a categorical variable having \(C\) distinct values over a data set \(S\), the Gini index is defined as $$ I(S)=\sum_{\begin{array}{c}i,j=1\\i\ne j\end{array}}^C p(i|S)=1-\sum^C_{i=1}p^2(i|S) $$ where \( p(i|S) \) denotes the probability that the variable is equal to the state \(i\) on the data set, \(S\).

    • DEVIANCE

      public static final DecisionTreeInfoGain.GainCriteria DEVIANCE
      A measure of the quality of fit.

      For a categorical variable having \(C\) distinct values over a data set \(S\), the Deviance measure is $$\sum_{i=1}^{C}n_i\log(p_i)$$ where \(p_i = Pr(Y=i)\) and \(n_i\) is the number of cases with \(Y=i\) on the node.

  • Method Details

    • values

      public static DecisionTreeInfoGain.GainCriteria[] 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 DecisionTreeInfoGain.GainCriteria 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