weka.classifiers.trees.ht
Class GiniSplitMetric
- java.lang.Object
-
- weka.classifiers.trees.ht.SplitMetric
-
- weka.classifiers.trees.ht.GiniSplitMetric
-
- All Implemented Interfaces:
- java.io.Serializable
public class GiniSplitMetric extends SplitMetric implements java.io.Serializable
Implements the gini splitting criterion- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description GiniSplitMetric()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description doubleevaluateSplit(java.util.Map<java.lang.String,WeightMass> preDist, java.util.List<java.util.Map<java.lang.String,WeightMass>> postDist)Evaluate the merit of a splitdoublegetMetricRange(java.util.Map<java.lang.String,WeightMass> preDist)Get the range of the splitting metricstatic doublegini(java.util.Map<java.lang.String,WeightMass> dist)Return the gini metric computed from the supplied distribution-
Methods inherited from class weka.classifiers.trees.ht.SplitMetric
sum
-
-
-
-
Method Detail
-
evaluateSplit
public double evaluateSplit(java.util.Map<java.lang.String,WeightMass> preDist, java.util.List<java.util.Map<java.lang.String,WeightMass>> postDist)
Description copied from class:SplitMetricEvaluate the merit of a split- Specified by:
evaluateSplitin classSplitMetric- Parameters:
preDist- the class distribution before the splitpostDist- the class distributions after the split- Returns:
- the merit of the split
-
gini
public static double gini(java.util.Map<java.lang.String,WeightMass> dist)
Return the gini metric computed from the supplied distribution- Parameters:
dist- dist the distribution to compute the gini metric from- Returns:
-
getMetricRange
public double getMetricRange(java.util.Map<java.lang.String,WeightMass> preDist)
Description copied from class:SplitMetricGet the range of the splitting metric- Specified by:
getMetricRangein classSplitMetric- Parameters:
preDist- the pre-split class distribution- Returns:
- the range of the splitting metric
-
-
DataMelt 3.0 © DataMelt by jWork.ORG