edu.uci.jforests.learning.trees.decision
Class Entropy
- java.lang.Object
-
- edu.uci.jforests.learning.trees.decision.Entropy
-
public class Entropy extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor and Description Entropy()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static doublegetEntropy(double[] dist)Computes the entropy of a given distribution.static doublegetSplitEntropy(double[] leftDist, double[] rightDist)
-
-
-
Method Detail
-
getEntropy
public static double getEntropy(double[] dist)
Computes the entropy of a given distribution. Entropy is computed as sum(-ci/T log2(ci/T)), where ci is the i-th element in the distribution and T is the sum of these elements. The following method computes the above definition using a faster computation.- Parameters:
dist-- Returns:
-
getSplitEntropy
public static double getSplitEntropy(double[] leftDist, double[] rightDist)
-
-
DMelt 3.0 © DataMelt by jWork.ORG