public interface Impurity
extends scala.Serializable
Strategy
(b) calculating impurity values from sufficient statistics.Modifier and Type | Method and Description |
---|---|
double |
calculate(double[] counts,
double totalCount)
information calculation for multiclass classification
|
double |
calculate(double count,
double sum,
double sumSquares)
information calculation for regression
|
double calculate(double[] counts, double totalCount)
counts
- Array[Double] with counts for each labeltotalCount
- sum of counts for all labelsdouble calculate(double count, double sum, double sumSquares)
count
- number of instancessum
- sum of labelssumSquares
- summation of squares of the labels