public class MultiNomialBMAEstimator extends BayesNetEstimator
-k2 Whether to use K2 prior.
-A <alpha> Initial count (alpha)
Constructor and Description |
---|
MultiNomialBMAEstimator() |
Modifier and Type | Method and Description |
---|---|
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.
|
java.lang.String[] |
getOptions()
Gets the current settings of the classifier.
|
java.lang.String |
getRevision()
Returns the revision string.
|
java.lang.String |
globalInfo()
Returns a string describing this object
|
void |
initCPTs(BayesNet bayesNet)
initCPTs reserves space for CPTs and set all counts to zero
|
boolean |
isUseK2Prior() |
java.util.Enumeration<Option> |
listOptions()
Returns an enumeration describing the available options
|
void |
setOptions(java.lang.String[] options)
Parses a given list of options.
|
void |
setUseK2Prior(boolean bUseK2Prior)
Sets the UseK2Prior.
|
void |
updateClassifier(BayesNet bayesNet,
Instance instance)
Updates the classifier with the given instance.
|
alphaTipText, getAlpha, setAlpha
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
makeCopy
public java.lang.String globalInfo()
globalInfo
in class BayesNetEstimator
public void estimateCPTs(BayesNet bayesNet) throws java.lang.Exception
estimateCPTs
in class BayesNetEstimator
bayesNet
- the bayes net to usejava.lang.Exception
- if number of parents doesn't fit (more than 1)public void updateClassifier(BayesNet bayesNet, Instance instance) throws java.lang.Exception
updateClassifier
in class BayesNetEstimator
bayesNet
- the bayes net to useinstance
- the new training instance to include in the modeljava.lang.Exception
- if the instance could not be incorporated in the model.public void initCPTs(BayesNet bayesNet) throws java.lang.Exception
initCPTs
in class BayesNetEstimator
bayesNet
- the bayes net to usejava.lang.Exception
- doesn't applypublic boolean isUseK2Prior()
public void setUseK2Prior(boolean bUseK2Prior)
bUseK2Prior
- The bUseK2Prior to setpublic double[] distributionForInstance(BayesNet bayesNet, Instance instance) throws java.lang.Exception
distributionForInstance
in class BayesNetEstimator
bayesNet
- the bayes net to useinstance
- the instance to be classifiedjava.lang.Exception
- if there is a problem generating the predictionpublic java.util.Enumeration<Option> listOptions()
listOptions
in interface OptionHandler
listOptions
in class BayesNetEstimator
public void setOptions(java.lang.String[] options) throws java.lang.Exception
-k2 Whether to use K2 prior.
-A <alpha> Initial count (alpha)
setOptions
in interface OptionHandler
setOptions
in class BayesNetEstimator
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
getOptions
in class BayesNetEstimator
public java.lang.String getRevision()
getRevision
in interface RevisionHandler
getRevision
in class BayesNetEstimator