public class GiniSplitMetric extends SplitMetric implements java.io.Serializable
Constructor and Description |
---|
GiniSplitMetric() |
Modifier and Type | Method and Description |
---|---|
double |
evaluateSplit(java.util.Map<java.lang.String,WeightMass> preDist,
java.util.List<java.util.Map<java.lang.String,WeightMass>> postDist)
Evaluate the merit of a split
|
double |
getMetricRange(java.util.Map<java.lang.String,WeightMass> preDist)
Get the range of the splitting metric
|
static double |
gini(java.util.Map<java.lang.String,WeightMass> dist)
Return the gini metric computed from the supplied distribution
|
sum
public double evaluateSplit(java.util.Map<java.lang.String,WeightMass> preDist, java.util.List<java.util.Map<java.lang.String,WeightMass>> postDist)
SplitMetric
evaluateSplit
in class SplitMetric
preDist
- the class distribution before the splitpostDist
- the class distributions after the splitpublic static double gini(java.util.Map<java.lang.String,WeightMass> dist)
dist
- dist the distribution to compute the gini metric frompublic double getMetricRange(java.util.Map<java.lang.String,WeightMass> preDist)
SplitMetric
getMetricRange
in class SplitMetric
preDist
- the pre-split class distribution