Package weka.classifiers.trees.ht
Class ConditionalSufficientStats
- java.lang.Object
-
- weka.classifiers.trees.ht.ConditionalSufficientStats
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
GaussianConditionalSufficientStats,NominalConditionalSufficientStats
public abstract class ConditionalSufficientStats extends java.lang.Object implements java.io.SerializableRecords sufficient stats for an attribute- Version:
- $Revision: 9705 $
- Author:
- Richard Kirkby (rkirkby@cs.waikato.ac.nz), Mark Hall (mhall{[at]}pentaho{[dot]}com)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ConditionalSufficientStats()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract SplitCandidatebestSplit(SplitMetric splitMetric, java.util.Map<java.lang.String,WeightMass> preSplitDist, java.lang.String attName)Return the best splitabstract doubleprobabilityOfAttValConditionedOnClass(double attVal, java.lang.String classVal)Return the probability of an attribute value conditioned on a class valueabstract voidupdate(double attVal, java.lang.String classVal, double weight)Update this stat with the supplied attribute value and class value
-
-
-
Method Detail
-
update
public abstract void update(double attVal, java.lang.String classVal, double weight)Update this stat with the supplied attribute value and class value- Parameters:
attVal- the value of the attributeclassVal- the class valueweight- the weight of this observation
-
probabilityOfAttValConditionedOnClass
public abstract double probabilityOfAttValConditionedOnClass(double attVal, java.lang.String classVal)Return the probability of an attribute value conditioned on a class value- Parameters:
attVal- the attribute value to compute the conditional probability forclassVal- the class value- Returns:
- the probability
-
bestSplit
public abstract SplitCandidate bestSplit(SplitMetric splitMetric, java.util.Map<java.lang.String,WeightMass> preSplitDist, java.lang.String attName)
Return the best split- Parameters:
splitMetric- the split metric to usepreSplitDist- the distribution of class values prior to splittingattName- the name of the attribute being considered for splitting- Returns:
- the best split for the attribute
-
-