BaseBaumWelch
org.encog.ml.hmm.train.bw

Class BaseBaumWelch

  • All Implemented Interfaces:
    MLTrain
    Direct Known Subclasses:
    TrainBaumWelch, TrainBaumWelchScaled


    public abstract class BaseBaumWelchextends Objectimplements MLTrain
    This class provides the base implementation for Baum-Welch learning for HMM's. There are currently two implementations provided. TrainBaumWelch - Regular Baum Welch Learning. TrainBaumWelchScaled - Regular Baum Welch Learning, which can handle underflows in long sequences. L. E. Baum, T. Petrie, G. Soules, and N. Weiss, "A maximization technique occurring in the statistical analysis of probabilistic functions of Markov chains" , Ann. Math. Statist., vol. 41, no. 1, pp. 164-171, 1970. Hidden Markov Models and the Baum-Welch Algorithm, IEEE Information Theory Society Newsletter, Dec. 2003.
    • Method Detail

      • addStrategy

        public void addStrategy(Strategy strategy)
        Description copied from interface: MLTrain
        Training strategies can be added to improve the training results. There are a number to choose from, and several can be used at once.
        Specified by:
        addStrategy in interface MLTrain
        Parameters:
        strategy - The strategy to add.
      • canContinue

        public boolean canContinue()
        Specified by:
        canContinue in interface MLTrain
        Returns:
        True if the training can be paused, and later continued.
      • finishTraining

        public void finishTraining()
        Description copied from interface: MLTrain
        Should be called once training is complete and no more iterations are needed. Calling iteration again will simply begin the training again, and require finishTraining to be called once the new training session is complete. It is particularly important to call finishTraining for multithreaded training techniques.
        Specified by:
        finishTraining in interface MLTrain
      • getError

        public double getError()
        Specified by:
        getError in interface MLTrain
        Returns:
        Returns the training error. This value is calculated as the training data is evaluated by the iteration function. This has two important ramifications. First, the value returned by getError() is meaningless prior to a call to iteration. Secondly, the error is calculated BEFORE training is applied by the call to iteration. The timing of the error calculation is done for performance reasons.
      • getIteration

        public int getIteration()
        Specified by:
        getIteration in interface MLTrain
        Returns:
        The current training iteration.
      • getMethod

        public MLMethod getMethod()
        Description copied from interface: MLTrain
        Get the current best machine learning method from the training.
        Specified by:
        getMethod in interface MLTrain
        Returns:
        The best machine learningm method.
      • isTrainingDone

        public boolean isTrainingDone()
        Specified by:
        isTrainingDone in interface MLTrain
        Returns:
        True if training can progress no further.
      • iteration

        public void iteration()
        Description copied from interface: MLTrain
        Perform one iteration of training.
        Specified by:
        iteration in interface MLTrain
      • iteration

        public void iteration(int count)
        Description copied from interface: MLTrain
        Perform a number of training iterations.
        Specified by:
        iteration in interface MLTrain
        Parameters:
        count - The number of iterations to perform.
      • pause

        public TrainingContinuation pause()
        Description copied from interface: MLTrain
        Pause the training to continue later.
        Specified by:
        pause in interface MLTrain
        Returns:
        A training continuation object.
      • resume

        public void resume(TrainingContinuation state)
        Description copied from interface: MLTrain
        Resume training.
        Specified by:
        resume in interface MLTrain
        Parameters:
        state - The training continuation object to use to continue.
      • setError

        public void setError(double error)
        Specified by:
        setError in interface MLTrain
        Parameters:
        error - Set the current error rate. This is usually used by training strategies.
      • setIteration

        public void setIteration(int iteration)
        Description copied from interface: MLTrain
        Set the current training iteration.
        Specified by:
        setIteration in interface MLTrain
        Parameters:
        iteration - Iteration.

SCaVis 1.8 © jWork.org