Class Entropy
Object
org.apache.spark.mllib.tree.impurity.Entropy
Class for calculating entropy during multiclass classification.
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionstatic doublecalculate(double[] counts, double totalCount) information calculation for multiclass classificationstatic doublecalculate(double count, double sum, double sumSquares) variance calculationstatic org.apache.spark.mllib.tree.impurity.Entropy$instance()Get this impurity instance. 
- 
Constructor Details
- 
Entropy
public Entropy() 
 - 
 - 
Method Details
- 
calculate
public static double calculate(double[] counts, double totalCount) information calculation for multiclass classification- Parameters:
 counts- Array[Double] with counts for each labeltotalCount- sum of counts for all labels- Returns:
 - information value, or 0 if totalCount = 0
 
 - 
calculate
public static double calculate(double count, double sum, double sumSquares) variance calculation- Parameters:
 count- number of instancessum- sum of labelssumSquares- summation of squares of the labels- Returns:
 - information value, or 0 if count = 0
 
 - 
instance
public static org.apache.spark.mllib.tree.impurity.Entropy$ instance()Get this impurity instance. This is useful for passing impurity parameters to a Strategy in Java.- Returns:
 - (undocumented)
 
 
 -