public class VarianceCalculator extends ImpurityCalculator
GiniAggregator
, this class stores its own data and is for a specific
(node, feature, bin).Constructor and Description |
---|
VarianceCalculator(double[] stats) |
Modifier and Type | Method and Description |
---|---|
double |
calculate()
Calculate the impurity from the stored sufficient statistics.
|
VarianceCalculator |
copy()
Make a deep copy of this
ImpurityCalculator . |
long |
count()
Number of data points accounted for in the sufficient statistics.
|
double |
predict()
Prediction which should be made based on the sufficient statistics.
|
String |
toString() |
add, prob, stats, subtract
public VarianceCalculator copy()
ImpurityCalculator
.copy
in class ImpurityCalculator
public double calculate()
calculate
in class ImpurityCalculator
public long count()
count
in class ImpurityCalculator
public double predict()
predict
in class ImpurityCalculator
public String toString()
toString
in class Object