Package weka.classifiers.trees.ht
Class NBNodeAdaptive
java.lang.Object
weka.classifiers.trees.ht.HNode
weka.classifiers.trees.ht.LeafNode
weka.classifiers.trees.ht.ActiveHNode
weka.classifiers.trees.ht.NBNode
weka.classifiers.trees.ht.NBNodeAdaptive
- All Implemented Interfaces:
Serializable,LearningNode
Implements a LearningNode that chooses between using majority class or naive
Bayes for prediction
- Version:
- $Revision: 9705 $
- Author:
- Richard Kirkby (rkirkby@cs.waikato.ac.nz), Mark Hall (mhall{[at]}pentaho{[dot]}com)
- See Also:
-
Field Summary
Fields inherited from class weka.classifiers.trees.ht.ActiveHNode
m_weightSeenAtLastSplitEvalFields inherited from class weka.classifiers.trees.ht.LeafNode
m_parentBranch, m_parentNode, m_theNodeFields inherited from class weka.classifiers.trees.ht.HNode
m_classDistribution -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble[]getDistribution(Instance inst, Attribute classAtt) Return a class probability distribution computed from the frequency counts at this nodevoidupdateNode(Instance inst) Update the node with the supplied instanceMethods inherited from class weka.classifiers.trees.ht.ActiveHNode
getPossibleSplitsMethods inherited from class weka.classifiers.trees.ht.HNode
classDistributionIsPure, graphTree, installNodeNums, isLeaf, leafForInstance, numEntriesInClassDistribution, toString, totalWeight, updateDistribution
-
Constructor Details
-
NBNodeAdaptive
Constructor- Parameters:
header- the structure of the instances we're training fromnbWeightThreshold- the weight mass to see before allowing naive Bayes to predict- Throws:
Exception- if a problem occurs
-
-
Method Details
-
updateNode
Description copied from class:HNodeUpdate the node with the supplied instance- Overrides:
updateNodein classNBNode- Parameters:
inst- the instance to update with- Throws:
Exception- if a problem occurs
-
getDistribution
Description copied from class:HNodeReturn a class probability distribution computed from the frequency counts at this node- Overrides:
getDistributionin classNBNode- Parameters:
inst- the instance to get a prediction forclassAtt- the class attribute- Returns:
- a class probability distribution
- Throws:
Exception- if a problem occurs
-