TrainBayesian
org.encog.ml.bayesian.training

Class TrainBayesian

  • All Implemented Interfaces:
    MLTrain


    public class TrainBayesianextends BasicTraining
    Train a Bayesian network.
    • 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

      • 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.
      • 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.

SCaVis 1.7 © jWork.org