public class NominalConditionalSufficientStats extends ConditionalSufficientStats implements java.io.Serializable
| Modifier and Type | Class and Description |
|---|---|
protected class |
NominalConditionalSufficientStats.ValueDistribution
Inner class that implements a discrete distribution
|
| Modifier and Type | Field and Description |
|---|---|
protected double |
m_missingWeight |
protected double |
m_totalWeight |
m_classLookup| Constructor and Description |
|---|
NominalConditionalSufficientStats() |
| Modifier and Type | Method and Description |
|---|---|
SplitCandidate |
bestSplit(SplitMetric splitMetric,
java.util.Map<java.lang.String,WeightMass> preSplitDist,
java.lang.String attName)
Return the best split
|
protected java.util.List<java.util.Map<java.lang.String,WeightMass>> |
classDistsAfterSplit() |
double |
probabilityOfAttValConditionedOnClass(double attVal,
java.lang.String classVal)
Return the probability of an attribute value conditioned on a class value
|
void |
update(double attVal,
java.lang.String classVal,
double weight)
Update this stat with the supplied attribute value and class value
|
protected double m_totalWeight
protected double m_missingWeight
public void update(double attVal,
java.lang.String classVal,
double weight)
ConditionalSufficientStatsupdate in class ConditionalSufficientStatsattVal - the value of the attributeclassVal - the class valueweight - the weight of this observationpublic double probabilityOfAttValConditionedOnClass(double attVal,
java.lang.String classVal)
ConditionalSufficientStatsprobabilityOfAttValConditionedOnClass in class ConditionalSufficientStatsattVal - the attribute value to compute the conditional probability
forclassVal - the class valueprotected java.util.List<java.util.Map<java.lang.String,WeightMass>> classDistsAfterSplit()
public SplitCandidate bestSplit(SplitMetric splitMetric, java.util.Map<java.lang.String,WeightMass> preSplitDist, java.lang.String attName)
ConditionalSufficientStatsbestSplit in class ConditionalSufficientStatssplitMetric - the split metric to usepreSplitDist - the distribution of class values prior to splittingattName - the name of the attribute being considered for splitting