public class Gini
extends Object
| Constructor and Description | 
|---|
| Gini() | 
| Modifier and Type | Method and Description | 
|---|---|
| static double | calculate(double[] counts,
         double totalCount)information calculation for multiclass classification | 
| static double | calculate(double count,
         double sum,
         double sumSquares)variance calculation | 
| static org.apache.spark.mllib.tree.impurity.Gini$ | instance()Get this impurity instance. | 
public static double calculate(double[] counts,
                               double totalCount)
counts - Array[Double] with counts for each labeltotalCount - sum of counts for all labelspublic static double calculate(double count,
                               double sum,
                               double sumSquares)
count - number of instancessum - sum of labelssumSquares - summation of squares of the labelspublic static org.apache.spark.mllib.tree.impurity.Gini$ instance()