hmm-lapack-0.5: Hidden Markov Models using LAPACK primitives
Safe HaskellNone
LanguageHaskell2010

Math.HiddenMarkovModel.Example.TrafficLightPrivate

Synopsis

Documentation

>>> import qualified Data.NonEmpty as NonEmpty
>>> import Control.DeepSeq (deepseq)
>>> 
>>> verifyRevelations :: HMM -> [Bool]
>>> verifyRevelations hmm_ =
>>> map (verifyRevelation hmm_) (NonEmpty.flatten labeledSequences)

data Color Source #

Constructors

Red 
Yellow 
Green 

Instances

Instances details
Enum Color Source # 
Instance details

Defined in Math.HiddenMarkovModel.Example.TrafficLightPrivate

Eq Color Source # 
Instance details

Defined in Math.HiddenMarkovModel.Example.TrafficLightPrivate

Methods

(==) :: Color -> Color -> Bool #

(/=) :: Color -> Color -> Bool #

Ord Color Source # 
Instance details

Defined in Math.HiddenMarkovModel.Example.TrafficLightPrivate

Methods

compare :: Color -> Color -> Ordering #

(<) :: Color -> Color -> Bool #

(<=) :: Color -> Color -> Bool #

(>) :: Color -> Color -> Bool #

(>=) :: Color -> Color -> Bool #

max :: Color -> Color -> Color #

min :: Color -> Color -> Color #

Read Color Source # 
Instance details

Defined in Math.HiddenMarkovModel.Example.TrafficLightPrivate

Show Color Source # 
Instance details

Defined in Math.HiddenMarkovModel.Example.TrafficLightPrivate

Methods

showsPrec :: Int -> Color -> ShowS #

show :: Color -> String #

showList :: [Color] -> ShowS #

NFData Color Source # 
Instance details

Defined in Math.HiddenMarkovModel.Example.TrafficLightPrivate

Methods

rnf :: Color -> () #

CSVSymbol Color Source #

Using show and read is not always a good choice since they must format and parse Haskell expressions which is not of much use to the outside world.

Instance details

Defined in Math.HiddenMarkovModel.Example.TrafficLightPrivate

hmm :: HMM Source #

>>> verifyRevelations hmm
[True,True]

hmmDisturbed :: HMM Source #

>>> verifyRevelations hmmDisturbed
[True,True]

hmmTrainedSupervised :: HMM Source #

Construct a Hidden Markov model by watching a set of manually created sequences of emissions and according states.

>>> verifyRevelations hmmTrainedSupervised
[True,True]

hmmTrainedUnsupervised :: HMM Source #

Construct a Hidden Markov model starting from a known model and a set of sequences that contain only the emissions, but no states.

>>> verifyRevelations hmmTrainedUnsupervised
[True,True]

hmmIterativelyTrained :: HMM Source #

Repeat unsupervised training until convergence.

deepseq hmmIterativelyTrained True