public class GaussianConditionalSufficientStats extends ConditionalSufficientStats implements java.io.Serializable
Constructor and Description |
---|
GaussianConditionalSufficientStats() |
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
|
int |
getNumBins() |
double |
probabilityOfAttValConditionedOnClass(double attVal,
java.lang.String classVal)
Return the probability of an attribute value conditioned on a class value
|
void |
setNumBins(int b) |
void |
update(double attVal,
java.lang.String classVal,
double weight)
Update this stat with the supplied attribute value and class value
|
public void setNumBins(int b)
public int getNumBins()
public void update(double attVal, java.lang.String classVal, double weight)
ConditionalSufficientStats
update
in class ConditionalSufficientStats
attVal
- the value of the attributeclassVal
- the class valueweight
- the weight of this observationpublic double probabilityOfAttValConditionedOnClass(double attVal, java.lang.String classVal)
ConditionalSufficientStats
probabilityOfAttValConditionedOnClass
in class ConditionalSufficientStats
attVal
- the attribute value to compute the conditional probability
forclassVal
- the class valuepublic SplitCandidate bestSplit(SplitMetric splitMetric, java.util.Map<java.lang.String,WeightMass> preSplitDist, java.lang.String attName)
ConditionalSufficientStats
bestSplit
in class ConditionalSufficientStats
splitMetric
- the split metric to usepreSplitDist
- the distribution of class values prior to splittingattName
- the name of the attribute being considered for splitting