Class SimpleEstimator
java.lang.Object
weka.classifiers.bayes.net.estimate.BayesNetEstimator
weka.classifiers.bayes.net.estimate.SimpleEstimator
- All Implemented Interfaces:
Serializable
,OptionHandler
,RevisionHandler
- Direct Known Subclasses:
BMAEstimator
SimpleEstimator is used for estimating the
conditional probability tables of a Bayes network once the structure has been
learned. Estimates probabilities directly from data.
Valid options are:
-A <alpha> Initial count (alpha)
- Version:
- $Revision: 11325 $
- Author:
- Remco Bouckaert (rrb@xm.co.nz)
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble[]
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.Returns the revision string.Returns a string describing this objectvoid
initCPTs reserves space for CPTs and set all counts to zerovoid
updateClassifier
(BayesNet bayesNet, Instance instance) Updates the classifier with the given instance.Methods inherited from class weka.classifiers.bayes.net.estimate.BayesNetEstimator
alphaTipText, getAlpha, getOptions, listOptions, setAlpha, setOptions
-
Constructor Details
-
SimpleEstimator
public SimpleEstimator()
-
-
Method Details
-
globalInfo
Returns a string describing this object- Overrides:
globalInfo
in 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:
estimateCPTs
in classBayesNetEstimator
- Parameters:
bayesNet
- the bayes net to use- Throws:
Exception
- if something goes wrong
-
updateClassifier
Updates the classifier with the given instance.- Overrides:
updateClassifier
in 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:
initCPTs
in classBayesNetEstimator
- Parameters:
bayesNet
- the bayes net to use- Throws:
Exception
- if something goes wrong
-
distributionForInstance
Calculates the class membership probabilities for the given test instance.- Overrides:
distributionForInstance
in 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
-
getRevision
Returns the revision string.- Specified by:
getRevision
in interfaceRevisionHandler
- Overrides:
getRevision
in classBayesNetEstimator
- Returns:
- the revision
-