| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Math.HiddenMarkovModel.Example.TrafficLightPrivate
Synopsis
- data Color
- data State
- type StateSet = Enumeration State
- stateSet :: StateSet
- type HMM = Discrete Color StateSet Double
- hmm :: HMM
- hmmDisturbed :: HMM
- stateVector :: Double -> Double -> Double -> Double -> Vector StateSet Double
- red :: (State, Color)
- yellowRG :: (State, Color)
- green :: (State, Color)
- yellowGR :: (State, Color)
- labeledSequences :: T [] (T [] (State, Color))
- hmmTrainedSupervised :: HMM
- stateSequences :: T [] (T [] Color)
- hmmTrainedUnsupervised :: HMM
- hmmIterativelyTrained :: HMM
- verifyRevelation :: HMM -> T [] (State, Color) -> Bool
Documentation
>>>import qualified Data.NonEmpty as NonEmpty>>>import Control.DeepSeq (deepseq)>>>>>>verifyRevelations :: HMM -> [Bool]>>>verifyRevelations hmm_ =>>>map (verifyRevelation hmm_) (NonEmpty.flatten labeledSequences)
Instances
| Enum Color Source # | |
| Eq Color Source # | |
| Ord Color Source # | |
| Read Color Source # | |
| Show Color Source # | |
| NFData Color Source # | |
| CSVSymbol Color Source # | Using |
Constructors
| StateRed | |
| StateYellowRG | |
| StateGreen | |
| StateYellowGR |
type StateSet = Enumeration State Source #
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