|
||||||||||
| 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 MLTrainstrategy - The strategy to add.public boolean canContinue()
canContinue in interface MLTrainpublic void finishTraining()
MLTrain
finishTraining in interface MLTrainpublic 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 | |||||||||