MOA 12.03
Real Time Analytics for Data Streams
moa.classifiers.core.attributeclassobservers.AttributeClassObserver Interface Reference

Interface for observing the class data distribution for an attribute. More...

Inheritance diagram for moa.classifiers.core.attributeclassobservers.AttributeClassObserver:
Collaboration diagram for moa.classifiers.core.attributeclassobservers.AttributeClassObserver:

List of all members.

Public Member Functions

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.
double probabilityOfAttributeValueGivenClass (double attVal, int classVal)
 Gets the probability for an attribute value given a class.
AttributeSplitSuggestion getBestEvaluatedSplitSuggestion (SplitCriterion criterion, double[] preSplitDist, int attIndex, boolean binaryOnly)
 Gets the best split suggestion given a criterion and a class distribution.

Detailed Description

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.

Author:
Richard Kirkby (rkirkby@cs.waikato.ac.nz)
Version:
Revision:
7

Definition at line 34 of file AttributeClassObserver.java.


Member Function Documentation

AttributeSplitSuggestion moa.classifiers.core.attributeclassobservers.AttributeClassObserver.getBestEvaluatedSplitSuggestion ( SplitCriterion  criterion,
double[]  preSplitDist,
int  attIndex,
boolean  binaryOnly 
)

Gets the best split suggestion given a criterion and a class distribution.

Parameters:
criterionthe split criterion to use
preSplitDistthe class distribution before the split
attIndexthe attribute index
binaryOnlytrue to use binary splits
Returns:
suggestion of best attribute split

Implemented in moa.classifiers.core.attributeclassobservers.BinaryTreeNumericAttributeClassObserver, moa.classifiers.core.attributeclassobservers.GaussianNumericAttributeClassObserver, moa.classifiers.core.attributeclassobservers.GreenwaldKhannaNumericAttributeClassObserver, moa.classifiers.core.attributeclassobservers.NominalAttributeClassObserver, moa.classifiers.core.attributeclassobservers.NullAttributeClassObserver, and moa.classifiers.core.attributeclassobservers.VFMLNumericAttributeClassObserver.

Referenced by moa.classifiers.trees.DecisionStump.findBestSplit().

Here is the caller graph for this function:

void moa.classifiers.core.attributeclassobservers.AttributeClassObserver.observeAttributeClass ( double  attVal,
int  classVal,
double  weight 
)
double moa.classifiers.core.attributeclassobservers.AttributeClassObserver.probabilityOfAttributeValueGivenClass ( double  attVal,
int  classVal 
)

The documentation for this interface was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations