|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.encog.ml.hmm.train.kmeans.TrainKMeans
public class TrainKMeans
Train a Hidden Markov Model (HMM) with the KMeans algorithm. Makes use of KMeans clustering to estimate the transitional and observational probabilities for the HMM. Unlike Baum Welch training, this method does not require a prior estimate of the HMM model, it starts from scratch. Faber, Clustering and the Continuous k-Means Algorithm, Los Alamos Science, no. 22, 1994.
Constructor Summary | |
---|---|
TrainKMeans(HiddenMarkovModel method,
MLSequenceSet sequences)
|
Method Summary | |
---|---|
void |
addStrategy(Strategy strategy)
Training strategies can be added to improve the training results. |
boolean |
canContinue()
|
void |
finishTraining()
Should be called once training is complete and no more iterations are needed. |
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 TrainKMeans(HiddenMarkovModel method, MLSequenceSet sequences)
Method Detail |
---|
public void addStrategy(Strategy strategy)
MLTrain
addStrategy
in interface MLTrain
strategy
- The strategy to add.public boolean canContinue()
canContinue
in interface MLTrain
public void finishTraining()
MLTrain
finishTraining
in interface MLTrain
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
getMethod
in interface 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
iteration
in interface MLTrain
public void iteration(int count)
MLTrain
iteration
in interface MLTrain
count
- The number of iterations to perform.public TrainingContinuation pause()
MLTrain
pause
in interface MLTrain
public void resume(TrainingContinuation state)
MLTrain
resume
in interface MLTrain
state
- The training continuation object to use to continue.public void setError(double error)
setError
in interface MLTrain
error
- Set the current error rate. This is usually used by training
strategies.public void setIteration(int iteration)
MLTrain
setIteration
in interface MLTrain
iteration
- Iteration.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |