public class BayesNetEstimator extends java.lang.Object implements OptionHandler, java.io.Serializable, RevisionHandler
-A <alpha> Initial count (alpha)
Constructor and Description |
---|
BayesNetEstimator() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
alphaTipText() |
double[] |
distributionForInstance(BayesNet bayesNet,
Instance instance)
Calculates the class membership probabilities for the given test instance.
|
void |
estimateCPTs(BayesNet bayesNet)
estimateCPTs estimates the conditional probability tables for the Bayes Net
using the network structure.
|
double |
getAlpha()
Get prior used in probability table estimation
|
java.lang.String[] |
getOptions()
Gets the current settings of the classifier.
|
java.lang.String |
getRevision()
Returns the revision string.
|
java.lang.String |
globalInfo()
This will return a string describing the class.
|
void |
initCPTs(BayesNet bayesNet)
initCPTs reserves space for CPTs and set all counts to zero
|
java.util.Enumeration<Option> |
listOptions()
Returns an enumeration describing the available options
|
void |
setAlpha(double fAlpha)
Set prior used in probability table estimation
|
void |
setOptions(java.lang.String[] options)
Parses a given list of options.
|
void |
updateClassifier(BayesNet bayesNet,
Instance instance)
Updates the classifier with the given instance.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
makeCopy
public void estimateCPTs(BayesNet bayesNet) throws java.lang.Exception
bayesNet
- the bayes net to usejava.lang.Exception
- always throws an exception, since subclass needs to be
usedpublic void updateClassifier(BayesNet bayesNet, Instance instance) throws java.lang.Exception
bayesNet
- the bayes net to useinstance
- the new training instance to include in the modeljava.lang.Exception
- always throws an exception, since subclass needs to be
usedpublic double[] distributionForInstance(BayesNet bayesNet, Instance instance) throws java.lang.Exception
bayesNet
- the bayes net to useinstance
- the instance to be classifiedjava.lang.Exception
- always throws an exception, since subclass needs to be
usedpublic void initCPTs(BayesNet bayesNet) throws java.lang.Exception
bayesNet
- the bayes net to usejava.lang.Exception
- always throws an exception, since subclass needs to be
usedpublic java.util.Enumeration<Option> listOptions()
listOptions
in interface OptionHandler
public void setOptions(java.lang.String[] options) throws java.lang.Exception
-A <alpha> Initial count (alpha)
setOptions
in interface OptionHandler
options
- the list of options as an array of stringsjava.lang.Exception
- if an option is not supportedpublic java.lang.String[] getOptions()
getOptions
in interface OptionHandler
public void setAlpha(double fAlpha)
fAlpha
- representing priorpublic double getAlpha()
public java.lang.String alphaTipText()
public java.lang.String globalInfo()
public java.lang.String getRevision()
getRevision
in interface RevisionHandler