public abstract class SplitMetric
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
SplitMetric() |
Modifier and Type | Method and Description |
---|---|
abstract 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
|
abstract double |
getMetricRange(java.util.Map<java.lang.String,WeightMass> preDist)
Get the range of the splitting metric
|
static double |
sum(java.util.Map<java.lang.String,WeightMass> dist)
Utility method to return the sum of instance weight in a distribution
|
public static double sum(java.util.Map<java.lang.String,WeightMass> dist)
dist
- the distributionpublic abstract double evaluateSplit(java.util.Map<java.lang.String,WeightMass> preDist, java.util.List<java.util.Map<java.lang.String,WeightMass>> postDist)
preDist
- the class distribution before the splitpostDist
- the class distributions after the splitpublic abstract double getMetricRange(java.util.Map<java.lang.String,WeightMass> preDist)
preDist
- the pre-split class distribution