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)
:: DeveloperApi ::
information calculation for multiclass classification
|
double |
calculate(double count,
double sum,
double sumSquares)
:: DeveloperApi ::
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