Overview | Package | Class | Tree | Deprecated | Index | Help | Weka's home

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## weka.classifiers.bayes.net.estimate
Class SimpleEstimator

    java.lang.Object
      weka.classifiers.bayes.net.estimate.BayesNetEstimator
          weka.classifiers.bayes.net.estimate.SimpleEstimator

All Implemented Interfaces:
  java.io.Serializable, OptionHandler, RevisionHandler

Direct Known Subclasses:
  BMAEstimator

    public class SimpleEstimator

extends BayesNetEstimator

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: 1.6 $
Author:
  Remco Bouckaert (rrb@xm.co.nz)
See Also:
  Serialized Form

Constructor Summary
`SimpleEstimator()`

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` | `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
`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, getOptions, listOptions, setAlpha, setOptions`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SimpleEstimator

    public SimpleEstimator()

Method Detail

### globalInfo

    public java.lang.String globalInfo()

  Returns a string describing this object

  Overrides:
    `globalInfo` in class `BayesNetEstimator`
  Returns:
    a description of the classifier suitable for displaying in the explorer/experimenter gui

### 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`
  Parameters:
    `bayesNet` - the bayes net to use
  Throws:
    `java.lang.Exception` - if something goes wrong

### 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:
    `bayesNet` - the bayes net to use
    `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`
  Parameters:
    `bayesNet` - the bayes net to use
  Throws:
    `java.lang.Exception` - if something goes wrong

### 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:
    `bayesNet` - the bayes net to use
    `instance` - the instance to be classified
  Returns:
    predicted class probability distribution
  Throws:
    `java.lang.Exception` - if there is a problem generating the prediction

### getRevision

    public java.lang.String getRevision()

  Returns the revision string.

  Specified by:
    `getRevision` in interface `RevisionHandler`
  Overrides:
    `getRevision` in class `BayesNetEstimator`
  Returns:
    the revision

Overview | Package | Class | Tree | Deprecated | Index | Help | Weka's home

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD