Class MultiNomialBMAEstimator
java.lang.Object
weka.classifiers.bayes.net.estimate.BayesNetEstimator
weka.classifiers.bayes.net.estimate.MultiNomialBMAEstimator
- All Implemented Interfaces:
Serializable,OptionHandler,RevisionHandler
Multinomial BMA Estimator.
Valid options are:
-k2 Whether to use K2 prior.
-A <alpha> Initial count (alpha)
- Version:
- $Revision: 12470 $
- Author:
- Remco Bouckaert (rrb@xm.co.nz)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble[]distributionForInstance(BayesNet bayesNet, Instance instance) Calculates the class membership probabilities for the given test instance.voidestimateCPTs(BayesNet bayesNet) estimateCPTs estimates the conditional probability tables for the Bayes Net using the network structure.String[]Gets the current settings of the classifier.Returns the revision string.Returns a string describing this objectvoidinitCPTs reserves space for CPTs and set all counts to zerobooleanReturns an enumeration describing the available optionsvoidsetOptions(String[] options) Parses a given list of options.voidsetUseK2Prior(boolean bUseK2Prior) Sets the UseK2Prior.voidupdateClassifier(BayesNet bayesNet, Instance instance) Updates the classifier with the given instance.Methods inherited from class weka.classifiers.bayes.net.estimate.BayesNetEstimator
alphaTipText, getAlpha, setAlpha
-
Constructor Details
-
MultiNomialBMAEstimator
public MultiNomialBMAEstimator()
-
-
Method Details
-
globalInfo
Returns a string describing this object- Overrides:
globalInfoin classBayesNetEstimator- Returns:
- a description of the classifier suitable for displaying in the explorer/experimenter gui
-
estimateCPTs
estimateCPTs estimates the conditional probability tables for the Bayes Net using the network structure.- Overrides:
estimateCPTsin classBayesNetEstimator- Parameters:
bayesNet- the bayes net to use- Throws:
Exception- if number of parents doesn't fit (more than 1)
-
updateClassifier
Updates the classifier with the given instance.- Overrides:
updateClassifierin classBayesNetEstimator- Parameters:
bayesNet- the bayes net to useinstance- the new training instance to include in the model- Throws:
Exception- if the instance could not be incorporated in the model.
-
initCPTs
initCPTs reserves space for CPTs and set all counts to zero- Overrides:
initCPTsin classBayesNetEstimator- Parameters:
bayesNet- the bayes net to use- Throws:
Exception- doesn't apply
-
isUseK2Prior
public boolean isUseK2Prior()- Returns:
- boolean
-
setUseK2Prior
public void setUseK2Prior(boolean bUseK2Prior) Sets the UseK2Prior.- Parameters:
bUseK2Prior- The bUseK2Prior to set
-
distributionForInstance
Calculates the class membership probabilities for the given test instance.- Overrides:
distributionForInstancein classBayesNetEstimator- Parameters:
bayesNet- the bayes net to useinstance- the instance to be classified- Returns:
- predicted class probability distribution
- Throws:
Exception- if there is a problem generating the prediction
-
listOptions
Returns an enumeration describing the available options- Specified by:
listOptionsin interfaceOptionHandler- Overrides:
listOptionsin classBayesNetEstimator- Returns:
- an enumeration of all the available options
-
setOptions
Parses a given list of options. Valid options are:-k2 Whether to use K2 prior.
-A <alpha> Initial count (alpha)
- Specified by:
setOptionsin interfaceOptionHandler- Overrides:
setOptionsin classBayesNetEstimator- Parameters:
options- the list of options as an array of strings- Throws:
Exception- if an option is not supported
-
getOptions
Gets the current settings of the classifier.- Specified by:
getOptionsin interfaceOptionHandler- Overrides:
getOptionsin classBayesNetEstimator- Returns:
- an array of strings suitable for passing to setOptions
-
getRevision
Returns the revision string.- Specified by:
getRevisionin interfaceRevisionHandler- Overrides:
getRevisionin classBayesNetEstimator- Returns:
- the revision
-