Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data HMM s o = HMM {
- states :: [s]
- outputs :: [o]
- initialStateDist :: Categorical Double s
- transitionDist :: s -> Categorical Double s
- emissionDist :: s -> Categorical Double o
- type LogLikelihood = Double
- new :: (Ord s, Ord o) => [s] -> [o] -> HMM s o
- viterbi :: (Eq s, Eq o) => HMM s o -> [o] -> ([s], LogLikelihood)
- baumWelch :: (Eq s, Eq o) => HMM s o -> [o] -> [(HMM s o, LogLikelihood)]
Documentation
Parameter set of the hidden Markov model. Direct use of the
constructor is not recommended. Instead, call new
.
HMM | |
|
type LogLikelihood = Double Source
new :: (Ord s, Ord o) => [s] -> [o] -> HMM s o Source
Construct a HMM
from the given states and outputs. The
initialStateDist
and emissionDist
are set to be uniform
distributions. The transitionDist
is specified as follows: with
probability 1/2, move to the same state, otherwise, move to a random
state (which might be the same state).