public class Gini extends Object implements Impurity
Gini impurity
during binary classification.Constructor and Description |
---|
Gini() |
Modifier and Type | Method and Description |
---|---|
static double |
calculate(double[] counts,
double totalCount)
:: DeveloperApi ::
information calculation for multiclass classification
|
static double |
calculate(double count,
double sum,
double sumSquares)
:: DeveloperApi ::
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()