Interface AttributeClassObserver
-
- All Superinterfaces:
Configurable
,MOAObject
,OptionHandler
,Serializable
- All Known Subinterfaces:
DiscreteAttributeClassObserver
,IademNumericAttributeObserver
,NumericAttributeClassObserver
- All Known Implementing Classes:
BinaryTreeNumericAttributeClassObserver
,BinaryTreeNumericAttributeClassObserverRegression
,FIMTDDNumericAttributeClassLimitObserver
,FIMTDDNumericAttributeClassObserver
,GaussianNumericAttributeClassObserver
,GreenwaldKhannaNumericAttributeClassObserver
,IademGaussianNumericAttributeClassObserver
,IademGreenwaldKhannaNumericAttributeClassObserver
,IademVFMLNumericAttributeClassObserver
,NominalAttributeClassObserver
,NullAttributeClassObserver
,VFMLNumericAttributeClassObserver
public interface AttributeClassObserver extends OptionHandler
Interface for observing the class data distribution for an attribute. This observer monitors the class distribution of a given attribute. Used in naive Bayes and decision trees to monitor data statistics on leaves.- Version:
- $Revision: 7 $
- Author:
- Richard Kirkby (rkirkby@cs.waikato.ac.nz)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AttributeSplitSuggestion
getBestEvaluatedSplitSuggestion(SplitCriterion criterion, double[] preSplitDist, int attIndex, boolean binaryOnly)
Gets the best split suggestion given a criterion and a class distributionvoid
observeAttributeClass(double attVal, int classVal, double weight)
Updates statistics of this observer given an attribute value, a class and the weight of the instance observedvoid
observeAttributeTarget(double attVal, double target)
double
probabilityOfAttributeValueGivenClass(double attVal, int classVal)
Gets the probability for an attribute value given a class-
Methods inherited from interface moa.MOAObject
getDescription, measureByteSize
-
Methods inherited from interface moa.options.OptionHandler
copy, getCLICreationString, getOptions, getPurposeString, prepareForUse, prepareForUse
-
-
-
-
Method Detail
-
observeAttributeClass
void observeAttributeClass(double attVal, int classVal, double weight)
Updates statistics of this observer given an attribute value, a class and the weight of the instance observed- Parameters:
attVal
- the value of the attributeclassVal
- the classweight
- the weight of the instance
-
probabilityOfAttributeValueGivenClass
double probabilityOfAttributeValueGivenClass(double attVal, int classVal)
Gets the probability for an attribute value given a class- Parameters:
attVal
- the attribute valueclassVal
- the class- Returns:
- probability for an attribute value given a class
-
getBestEvaluatedSplitSuggestion
AttributeSplitSuggestion getBestEvaluatedSplitSuggestion(SplitCriterion criterion, double[] preSplitDist, int attIndex, boolean binaryOnly)
Gets the best split suggestion given a criterion and a class distribution- Parameters:
criterion
- the split criterion to usepreSplitDist
- the class distribution before the splitattIndex
- the attribute indexbinaryOnly
- true to use binary splits- Returns:
- suggestion of best attribute split
-
observeAttributeTarget
void observeAttributeTarget(double attVal, double target)
-
-