public interface Impurity
extends scala.Serializable
Strategy
(b) calculating impurity values from sufficient statistics.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