Interface Impurity
- All Superinterfaces:
- Serializable
Trait for calculating information gain.
 This trait is used for
  (a) setting the impurity parameter in 
Strategy
  (b) calculating impurity values from sufficient statistics.- 
Method Summary
- 
Method Details- 
calculatedouble calculate(double[] counts, double totalCount) information calculation for multiclass classification- Parameters:
- counts- Array[Double] with counts for each label
- totalCount- sum of counts for all labels
- Returns:
- information value, or 0 if totalCount = 0
 
- 
calculatedouble calculate(double count, double sum, double sumSquares) information calculation for regression- Parameters:
- count- number of instances
- sum- sum of labels
- sumSquares- summation of squares of the labels
- Returns:
- information value, or 0 if count = 0
 
 
-