Home | Trees | Index | Help |
|
---|
Package nltk_lite :: Package tag :: Module hmm :: Class HiddenMarkovModelTrainer |
|
object
--+
|
HiddenMarkovModelTrainer
Method Summary | |
---|---|
Creates an HMM trainer to induce an HMM with the given states and output symbol alphabet. | |
HiddenMarkovModel |
Trains the HMM using both (or either of) supervised and unsupervised techniques. |
HiddenMarkovModel |
Supervised training maximising the joint probability of the symbol and state sequences. |
HiddenMarkovModel |
Trains the HMM using the Baum-Welch algorithm to maximise the probability of the data sequence. |
Inherited from object :
__delattr__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__str__
|
Method Details |
---|
__init__(self,
states=None,
symbols=None)
Creates an HMM trainer to induce an HMM with the given states and
output symbol alphabet. A supervised and unsupervised training method
may be used. If either of the states or symbols are not given, these
may be derived from supervised training.
|
train(self, labelled_sequences=None, unlabelled_sequences=None, **kwargs)Trains the HMM using both (or either of) supervised and unsupervised techniques.
|
train_supervised(self, labelled_sequences, **kwargs)Supervised training maximising the joint probability of the symbol and state sequences. This is done via collecting frequencies of transitions between states, symbol observations while within each state and which states start a sentence. These frequency distributions are then normalised into probability estimates, which can be smoothed if desired.
|
train_unsupervised(self, unlabelled_sequences, **kwargs)Trains the HMM using the Baum-Welch algorithm to maximise the probability of the data sequence. This is a variant of the EM algorithm, and is unsupervised in that it doesn't need the state sequences for the symbols. The code is based on 'A Tutorial on Hidden Markov Models and Selected Applications in Speech Recognition', Lawrence Rabiner, IEEE, 1989.
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Tue Sep 5 09:37:22 2006 | http://epydoc.sf.net |