Package weka.classifiers.trees.ht
Class SplitMetric
java.lang.Object
weka.classifiers.trees.ht.SplitMetric
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
GiniSplitMetric
,InfoGainSplitMetric
Base class for split metrics
- Version:
- $Revision: 9720 $
- Author:
- Richard Kirkby (rkirkby@cs.waikato.ac.nz), Mark Hall (mhall{[at]}pentaho{[dot]}com)
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract double
evaluateSplit
(Map<String, WeightMass> preDist, List<Map<String, WeightMass>> postDist) Evaluate the merit of a splitabstract double
getMetricRange
(Map<String, WeightMass> preDist) Get the range of the splitting metricstatic double
sum
(Map<String, WeightMass> dist) Utility method to return the sum of instance weight in a distribution
-
Constructor Details
-
SplitMetric
public SplitMetric()
-
-
Method Details
-
sum
Utility method to return the sum of instance weight in a distribution- Parameters:
dist
- the distribution- Returns:
- the sum of the weights contained in a distribution
-
evaluateSplit
public abstract double evaluateSplit(Map<String, WeightMass> preDist, List<Map<String, WeightMass>> postDist) Evaluate the merit of a split- Parameters:
preDist
- the class distribution before the splitpostDist
- the class distributions after the split- Returns:
- the merit of the split
-
getMetricRange
Get the range of the splitting metric- Parameters:
preDist
- the pre-split class distribution- Returns:
- the range of the splitting metric
-