Package org.biojava.bio.dp
Class SimpleHMMTrainer
- java.lang.Object
-
- org.biojava.bio.dp.SimpleHMMTrainer
-
- All Implemented Interfaces:
HMMTrainer
public class SimpleHMMTrainer extends Object implements HMMTrainer
-
-
Constructor Summary
Constructors Constructor Description SimpleHMMTrainer(MarkovModel model)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcompleteCycle()indicate that a cycle of training is completed and the emission/transition matrices should be updated.voidrecordEmittedSymbol(State state, Symbol symbol, double weight)record that the specified symbol was emitted from the specified state.voidrecordTransition(State source, State dest, double weight)record that a transition was observed between the specified states.voidstartCycle()called to put the trainer into an initial state for a new round of training.
-
-
-
Constructor Detail
-
SimpleHMMTrainer
public SimpleHMMTrainer(MarkovModel model) throws IllegalSymbolException
- Throws:
IllegalSymbolException
-
-
Method Detail
-
startCycle
public void startCycle()
Description copied from interface:HMMTrainercalled to put the trainer into an initial state for a new round of training.- Specified by:
startCyclein interfaceHMMTrainer
-
recordEmittedSymbol
public void recordEmittedSymbol(State state, Symbol symbol, double weight) throws IllegalSymbolException
Description copied from interface:HMMTrainerrecord that the specified symbol was emitted from the specified state.- Specified by:
recordEmittedSymbolin interfaceHMMTrainer- Throws:
IllegalSymbolException
-
recordTransition
public void recordTransition(State source, State dest, double weight) throws IllegalArgumentException
Description copied from interface:HMMTrainerrecord that a transition was observed between the specified states.- Specified by:
recordTransitionin interfaceHMMTrainer- Throws:
IllegalArgumentException
-
completeCycle
public void completeCycle() throws BioException
Description copied from interface:HMMTrainerindicate that a cycle of training is completed and the emission/transition matrices should be updated.- Specified by:
completeCyclein interfaceHMMTrainer- Throws:
BioException
-
-