Package weka.classifiers.trees.ht
Class NominalConditionalSufficientStats
java.lang.Object
weka.classifiers.trees.ht.ConditionalSufficientStats
weka.classifiers.trees.ht.NominalConditionalSufficientStats
- All Implemented Interfaces:
Serializable
public class NominalConditionalSufficientStats
extends ConditionalSufficientStats
implements Serializable
Maintains sufficient stats for the distribution of a nominal attribute
- Version:
- $Revision: 10432 $
- Author:
- Richard Kirkby (rkirkby@cs.waikato.ac.nz), Mark Hall (mhall{[at]}pentaho{[dot]}com)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbestSplit(SplitMetric splitMetric, Map<String, WeightMass> preSplitDist, String attName) Return the best splitdoubleprobabilityOfAttValConditionedOnClass(double attVal, String classVal) Return the probability of an attribute value conditioned on a class valuevoidUpdate this stat with the supplied attribute value and class value
-
Constructor Details
-
NominalConditionalSufficientStats
public NominalConditionalSufficientStats()
-
-
Method Details
-
update
Description copied from class:ConditionalSufficientStatsUpdate this stat with the supplied attribute value and class value- Specified by:
updatein classConditionalSufficientStats- Parameters:
attVal- the value of the attributeclassVal- the class valueweight- the weight of this observation
-
probabilityOfAttValConditionedOnClass
Description copied from class:ConditionalSufficientStatsReturn the probability of an attribute value conditioned on a class value- Specified by:
probabilityOfAttValConditionedOnClassin classConditionalSufficientStats- Parameters:
attVal- the attribute value to compute the conditional probability forclassVal- the class value- Returns:
- the probability
-
bestSplit
public SplitCandidate bestSplit(SplitMetric splitMetric, Map<String, WeightMass> preSplitDist, String attName) Description copied from class:ConditionalSufficientStatsReturn the best split- Specified by:
bestSplitin classConditionalSufficientStats- 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
-