org.encog.ml.hmm.train.bw
public abstract class BaseBaumWelch extends Object implements MLTrain
Constructor and Description |
---|
BaseBaumWelch(HiddenMarkovModel hmm,
MLSequenceSet training) |
Modifier and Type | Method and Description |
---|---|
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.
|
public BaseBaumWelch(HiddenMarkovModel hmm, MLSequenceSet training)
public void addStrategy(Strategy strategy)
MLTrain
addStrategy
in interface MLTrain
strategy
- 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 MLTrain
public TrainingImplementationType getImplementationType()
getImplementationType
in interface MLTrain
public int getIteration()
getIteration
in interface MLTrain
public MLMethod getMethod()
MLTrain
public List<Strategy> getStrategies()
getStrategies
in interface MLTrain
public MLDataSet getTraining()
getTraining
in interface MLTrain
public boolean isTrainingDone()
isTrainingDone
in interface MLTrain
public void iteration()
MLTrain
public void iteration(int count)
MLTrain
public TrainingContinuation pause()
MLTrain
public void resume(TrainingContinuation state)
MLTrain
public void setError(double error)
public void setIteration(int iteration)
MLTrain
setIteration
in interface MLTrain
iteration
- Iteration.Copyright © 2014. All Rights Reserved.