|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.encog.ml.hmm.train.bw.BaseBaumWelch
public abstract class BaseBaumWelch
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.
| Constructor Summary | |
|---|---|
BaseBaumWelch(HiddenMarkovModel hmm,
MLSequenceSet training)
|
|
| Method Summary | |
|---|---|
void |
addStrategy(Strategy strategy)
Training strategies can be added to improve the training results. |
boolean |
canContinue()
|
protected double[][] |
estimateGamma(double[][][] xi,
ForwardBackwardCalculator fbc)
|
abstract double[][][] |
estimateXi(MLDataSet sequence,
ForwardBackwardCalculator fbc,
HiddenMarkovModel hmm)
|
void |
finishTraining()
Should be called once training is complete and no more iterations are needed. |
abstract ForwardBackwardCalculator |
generateForwardBackwardCalculator(MLDataSet sequence,
HiddenMarkovModel hmm)
|
double |
getError()
|
TrainingImplementationType |
getImplementationType()
|
int |
getIteration()
|
MLMethod |
getMethod()
Get the current best machine learning method from the training. |
List<Strategy> |
getStrategies()
|
MLDataSet |
getTraining()
|
boolean |
isTrainingDone()
|
void |
iteration()
Perform one iteration of training. |
void |
iteration(int count)
Perform a number of training iterations. |
TrainingContinuation |
pause()
Pause the training to continue later. |
void |
resume(TrainingContinuation state)
Resume training. |
void |
setError(double error)
|
void |
setIteration(int iteration)
Set the current training iteration. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BaseBaumWelch(HiddenMarkovModel hmm,
MLSequenceSet training)
| Method Detail |
|---|
public void addStrategy(Strategy strategy)
MLTrain
addStrategy in interface MLTrainstrategy - The strategy to add.public boolean canContinue()
canContinue in interface MLTrain
protected double[][] estimateGamma(double[][][] xi,
ForwardBackwardCalculator fbc)
public abstract double[][][] estimateXi(MLDataSet sequence,
ForwardBackwardCalculator fbc,
HiddenMarkovModel hmm)
public void finishTraining()
MLTrain
finishTraining in interface MLTrain
public abstract ForwardBackwardCalculator generateForwardBackwardCalculator(MLDataSet sequence,
HiddenMarkovModel hmm)
public double getError()
getError in interface MLTrainpublic TrainingImplementationType getImplementationType()
getImplementationType in interface MLTrainpublic int getIteration()
getIteration in interface MLTrainpublic MLMethod getMethod()
MLTrain
getMethod in interface MLTrainpublic List<Strategy> getStrategies()
getStrategies in interface MLTrainpublic MLDataSet getTraining()
getTraining in interface MLTrainpublic boolean isTrainingDone()
isTrainingDone in interface MLTrainpublic void iteration()
MLTrain
iteration in interface MLTrainpublic void iteration(int count)
MLTrain
iteration in interface MLTraincount - The number of iterations to perform.public TrainingContinuation pause()
MLTrain
pause in interface MLTrainpublic void resume(TrainingContinuation state)
MLTrain
resume in interface MLTrainstate - The training continuation object to use to continue.public void setError(double error)
setError in interface MLTrainerror - Set the current error rate. This is usually used by training
strategies.public void setIteration(int iteration)
MLTrain
setIteration in interface MLTrainiteration - Iteration.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||