public class Variance extends java.lang.Object implements Impurity
Constructor and Description |
---|
Variance() |
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.Variance$ |
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.Variance$ instance()