weka.classifiers.bayes.net.estimate
Class MultiNomialBMAEstimator

java.lang.Object
  extended by weka.classifiers.bayes.net.estimate.BayesNetEstimator
      extended by weka.classifiers.bayes.net.estimate.MultiNomialBMAEstimator
All Implemented Interfaces:
java.io.Serializable, OptionHandler

public class MultiNomialBMAEstimator
extends BayesNetEstimator

Version:
$Revision: 1.3.2.3 $
See Also:
Serialized Form

Constructor Summary
MultiNomialBMAEstimator()
           
 
Method Summary
 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.
 void initCPTs(BayesNet bayesNet)
          initCPTs reserves space for CPTs and set all counts to zero
 boolean isUseK2Prior()
           
 java.util.Enumeration 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.
 
Methods inherited from class weka.classifiers.bayes.net.estimate.BayesNetEstimator
alphaTipText, getAlpha, globalInfo, setAlpha
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiNomialBMAEstimator

public MultiNomialBMAEstimator()
Method Detail

estimateCPTs

public void estimateCPTs(BayesNet bayesNet)
                  throws java.lang.Exception
estimateCPTs estimates the conditional probability tables for the Bayes Net using the network structure.

Overrides:
estimateCPTs in class BayesNetEstimator
Throws:
java.lang.Exception

updateClassifier

public void updateClassifier(BayesNet bayesNet,
                             Instance instance)
                      throws java.lang.Exception
Updates the classifier with the given instance.

Overrides:
updateClassifier in class BayesNetEstimator
Parameters:
instance - the new training instance to include in the model
Throws:
java.lang.Exception - if the instance could not be incorporated in the model.

initCPTs

public void initCPTs(BayesNet bayesNet)
              throws java.lang.Exception
initCPTs reserves space for CPTs and set all counts to zero

Overrides:
initCPTs in class BayesNetEstimator
Throws:
java.lang.Exception

isUseK2Prior

public boolean isUseK2Prior()
Returns:
boolean

setUseK2Prior

public void setUseK2Prior(boolean bUseK2Prior)
Sets the UseK2Prior.

Parameters:
bUseK2Prior - The bUseK2Prior to set

distributionForInstance

public double[] distributionForInstance(BayesNet bayesNet,
                                        Instance instance)
                                 throws java.lang.Exception
Calculates the class membership probabilities for the given test instance.

Overrides:
distributionForInstance in class BayesNetEstimator
Parameters:
instance - the instance to be classified
Returns:
predicted class probability distribution
Throws:
java.lang.Exception - if there is a problem generating the prediction

listOptions

public java.util.Enumeration listOptions()
Returns an enumeration describing the available options

Specified by:
listOptions in interface OptionHandler
Overrides:
listOptions in class BayesNetEstimator
Returns:
an enumeration of all the available options

setOptions

public void setOptions(java.lang.String[] options)
                throws java.lang.Exception
Parses a given list of options. Valid options are:

Specified by:
setOptions in interface OptionHandler
Overrides:
setOptions in class BayesNetEstimator
Parameters:
options - the list of options as an array of strings
Throws:
java.lang.Exception - if an option is not supported

getOptions

public java.lang.String[] getOptions()
Gets the current settings of the classifier.

Specified by:
getOptions in interface OptionHandler
Overrides:
getOptions in class BayesNetEstimator
Returns:
an array of strings suitable for passing to setOptions