hmm-lapack- Hidden Markov Models using LAPACK primitives

Safe HaskellNone




data T distr sh ix prob Source

A Hidden Markov Model with names for each state.

Although nameFromStateMap and stateFromNameMap are exported you must be careful to keep them consistent when you alter them.




model :: T distr sh prob
nameFromStateMap :: Array sh String
stateFromNameMap :: Map String ix


(Show distr, Show sh, Show ix, Show prob, Storable prob, C sh) => Show (T distr sh ix prob) 
(NFData distr, NFData sh, NFData ix, NFData prob, C sh, Storable prob) => NFData (T distr sh ix prob) 

type Discrete symbol stateSh prob = T (Discrete symbol stateSh prob) stateSh (Index stateSh) probSource

type Gaussian emiSh stateSh a = T (Gaussian emiSh stateSh a) stateSh (Index stateSh) aSource

fromModelAndNames :: (Indexed sh, Index sh ~ state) => T distr sh prob -> [String] -> T distr sh state probSource

toCSV :: (ToCSV distr, Indexed sh, Real prob, Show prob) => T distr sh ix prob -> StringSource

fromCSV :: (FromCSV distr, StateShape distr ~ stateSh, Indexed stateSh, Index stateSh ~ state, Real prob, Read prob) => (Int -> stateSh) -> String -> Exceptional String (T distr stateSh state prob)Source