public class NBNode extends ActiveHNode implements LearningNode, java.io.Serializable
m_weightSeenAtLastSplitEval
m_parentBranch, m_parentNode, m_theNode
m_classDistribution
Constructor and Description |
---|
NBNode(Instances header,
double nbWeightThreshold)
Construct a new NBNode
|
Modifier and Type | Method and Description |
---|---|
double[] |
getDistribution(Instance inst,
Attribute classAtt)
Return a class probability distribution computed from the frequency counts
at this node
|
void |
updateNode(Instance inst)
Update the node with the supplied instance
|
getPossibleSplits
classDistributionIsPure, graphTree, installNodeNums, isLeaf, leafForInstance, numEntriesInClassDistribution, toString, totalWeight, updateDistribution
public NBNode(Instances header, double nbWeightThreshold) throws java.lang.Exception
header
- the instances structure of the data we're learning fromnbWeightThreshold
- the weight mass to see before allowing naive Bayes
to predictjava.lang.Exception
- if a problem occurspublic void updateNode(Instance inst) throws java.lang.Exception
HNode
updateNode
in class ActiveHNode
inst
- the instance to update withjava.lang.Exception
- if a problem occurspublic double[] getDistribution(Instance inst, Attribute classAtt) throws java.lang.Exception
HNode
getDistribution
in class HNode
inst
- the instance to get a prediction forclassAtt
- the class attributejava.lang.Exception
- if a problem occurs