public class BayesNetEstimator extends Object implements OptionHandler, Serializable, RevisionHandler
-A <alpha> Initial count (alpha)
| Constructor and Description |
|---|
BayesNetEstimator() |
| Modifier and Type | Method and Description |
|---|---|
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
|
String[] |
getOptions()
Gets the current settings of the classifier.
|
String |
getRevision()
Returns the revision string.
|
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
|
Enumeration<Option> |
listOptions()
Returns an enumeration describing the available options
|
void |
setAlpha(double fAlpha)
Set prior used in probability table estimation
|
void |
setOptions(String[] options)
Parses a given list of options.
|
void |
updateClassifier(BayesNet bayesNet,
Instance instance)
Updates the classifier with the given instance.
|
public void estimateCPTs(BayesNet bayesNet) throws Exception
bayesNet - the bayes net to useException - always throws an exception, since subclass needs to be
usedpublic void updateClassifier(BayesNet bayesNet, Instance instance) throws Exception
bayesNet - the bayes net to useinstance - the new training instance to include in the modelException - always throws an exception, since subclass needs to be
usedpublic double[] distributionForInstance(BayesNet bayesNet, Instance instance) throws Exception
bayesNet - the bayes net to useinstance - the instance to be classifiedException - always throws an exception, since subclass needs to be
usedpublic void initCPTs(BayesNet bayesNet) throws Exception
bayesNet - the bayes net to useException - always throws an exception, since subclass needs to be
usedpublic Enumeration<Option> listOptions()
listOptions in interface OptionHandlerpublic void setOptions(String[] options) throws Exception
-A <alpha> Initial count (alpha)
setOptions in interface OptionHandleroptions - the list of options as an array of stringsException - if an option is not supportedpublic String[] getOptions()
getOptions in interface OptionHandlerpublic void setAlpha(double fAlpha)
fAlpha - representing priorpublic double getAlpha()
public String alphaTipText()
public String globalInfo()
public String getRevision()
getRevision in interface RevisionHandlerCopyright © 2014 University of Waikato, Hamilton, NZ. All Rights Reserved.