hmm-0.1: Hidden Markov Model algorithms

Data.HMM

Synopsis

Documentation

type Prob = Lognum DoubleSource

data HMM state observation Source

The type of Hidden Markov Models.

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.