Class: StateLabelHMM | /amd/bernoulli/1/home/abt_vin/georgi/hmm/0.7/ghmm//ghmmwrapper/ghmm.py | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Labelled HMMs with discrete emissions. Same feature list as in DiscreteEmission models.
|
externalLabel
|
| externalLabel ( self, internal ) Returns label representation of an int or list of int
|
forwardLabels
|
| forwardLabels ( self, emissionSequence, labelSequence, ) Result: the (N x T)-matrix containing the forward-variables and the scaling vector
|
getLabel
|
| getLabel ( self, stateIndex ) Returns label of the state
|
getLabels
|
| getLabels ( self )
|
gradientSearch
|
| gradientSearch ( self, emissionsequences, eta=.1, steps=20, ) trains a model with given sequencesgradescentFunction using gradient descentemission_sequences can either be a SequenceSet or an EmissionSequence
|
internalLabel
|
| internalLabel ( self, external ) Return int representation of an label or list of labels
|
kbest
|
| kbest ( self, emissionSequences, k=1, ) Compute the k probable labeling for each sequence in emissionSequencesemissionSequences can either be a SequenceSet or an EmissionSequence Result: [l_0, ..., l_T] the labeling of emissionSequences is an emmissionSequence object, [[l_0^0, ..., l_T^0], ..., [l_0^k, ..., l_T^k]} for a k-sequence SequenceSet
|
labelSeqLikelihoods
|
| labelSeqLikelihoods ( self, emissionSequences ) Compute a vector ( log( P[s,l| model]) )_{s} of log-likelihoods of the individual emission_sequences using the forward algorithm emission_sequences is of type SequenceSet Result: log( P[emissionSequences,labels| model]) of type float (numarray) vector of floats
|
modelNormalize
|
| modelNormalize ( self )
|
sample
|
| sample ( self, seqNr, seqLength, seed=0, )
|
sampleSingle
|
| sampleSingle ( self, seqLength, seed=0, )
|
setLabels
|
| setLabels ( self, labelList ) Set the state labels to the values given in labelList. LabelList is in external representation.
|
viterbiLabels
|
| viterbiLabels ( self, emissionSequences ) Returns on approximation of the most likely labeling of the input sequence(s) as given by the viterbi path.
|