- type Prob = Lognum Double
- data HMM state observation
- train :: (Ord observation, Ord state) => [(observation, state)] -> HMM state observation
- bestSequence :: Ord observation => HMM state observation -> [observation] -> [state]
- sequenceProb :: Ord observation => HMM state observation -> [observation] -> Prob
Documentation
train :: (Ord observation, Ord state) => [(observation, state)] -> HMM state observationSource
Calculate the parameters of an HMM from a list of observations and the corresponding states.
bestSequence :: Ord observation => HMM state observation -> [observation] -> [state]Source
Calculate the most likely sequence of states for a given sequence of observations using Viterbi's algorithm
sequenceProb :: Ord observation => HMM state observation -> [observation] -> ProbSource
Calculate the probability of a given sequence of observations using the forward algorithm.