Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.encog.ml.bayesian.training
Class TrainBayesian

    java.lang.Object
      org.encog.ml.train.BasicTraining
          org.encog.ml.bayesian.training.TrainBayesian

All Implemented Interfaces:
  MLTrain

    public class TrainBayesian

extends BasicTraining

Train a Bayesian network.

Constructor Summary
`TrainBayesian(BayesianNetwork theNetwork, MLDataSet theData, int theMaximumParents)` Construct a Bayesian trainer.
`TrainBayesian(BayesianNetwork theNetwork, MLDataSet theData, int theMaximumParents, BayesianInit theInit, BayesSearch theSearch, BayesEstimator theEstimator)` Construct a Bayesian trainer.

Method Summary
`boolean` | `canContinue()`
`BayesianInit` | `getInitNetwork()`
`int` | `getMaximumParents()`
`MLMethod` | `getMethod()` Get the current best machine learning method from the training.
`BayesianNetwork` | `getNetwork()`
`BayesSearch` | `getSearch()`
`boolean` | `isTrainingDone()`
`void` | `iteration()` Perform one iteration of training.
`TrainingContinuation` | `pause()` Pause the training to continue later.
`void` | `resume(TrainingContinuation state)` Resume training.
`void` | `setInitNetwork(BayesianInit initNetwork)` Set the network init method.

Methods inherited from class org.encog.ml.train.BasicTraining
`addStrategy, finishTraining, getError, getImplementationType, getIteration, getStrategies, getTraining, iteration, postIteration, preIteration, setError, setIteration, setTraining`

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

Constructor Detail

### TrainBayesian

    public TrainBayesian(BayesianNetwork theNetwork,
                         MLDataSet theData,
                         int theMaximumParents)

  Construct a Bayesian trainer. Use K2 to search, and the SimpleEstimator to estimate probability. Init as Naive Bayes

  Parameters:
    `theNetwork` - The network to train.
    `theData` - The data to train.
    `theMaximumParents` - The max number of parents.

### TrainBayesian

    public TrainBayesian(BayesianNetwork theNetwork,
                         MLDataSet theData,
                         int theMaximumParents,
                         BayesianInit theInit,
                         BayesSearch theSearch,
                         BayesEstimator theEstimator)

  Construct a Bayesian trainer.

  Parameters:
    `theNetwork` - The network to train.
    `theData` - The data to train with.
    `theMaximumParents` - The maximum number of parents.
    `theInit` - How to init the new Bayes network.
    `theSearch` - The search method.
    `theEstimator` - The estimation mehod.

Method Detail

### isTrainingDone

    public boolean isTrainingDone()

  Specified by:
    `isTrainingDone` in interface `MLTrain`
  Overrides:
    `isTrainingDone` in class `BasicTraining`
  Returns:
    True if training can progress no further.

### iteration

    public void iteration()

  Perform one iteration of training.

### canContinue

    public boolean canContinue()

  Returns:
    True if the training can be paused, and later continued.

### pause

    public TrainingContinuation pause()

  Pause the training to continue later.

  Returns:
    A training continuation object.

### resume

    public void resume(TrainingContinuation state)

  Resume training.

  Parameters:
    `state` - The training continuation object to use to continue.

### getMethod

    public MLMethod getMethod()

  Get the current best machine learning method from the training.

  Returns:
    The best machine learningm method.

### getNetwork

    public BayesianNetwork getNetwork()

  Returns:
    the network

### getMaximumParents

    public int getMaximumParents()

  Returns:
    the maximumParents

### getSearch

    public BayesSearch getSearch()

  Returns:
    The search method.

### getInitNetwork

    public BayesianInit getInitNetwork()

  Returns:
    The init method.

### setInitNetwork

    public void setInitNetwork(BayesianInit initNetwork)

  Set the network init method.

  Parameters:
    `initNetwork` - The init method.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2012. All Rights Reserved.