I am looking for some simple Mathematica code to model an HMM with just a few states and an equal number of observable signals (emissions). I am hoping to generate sample paths and keep track of the posterior probability of the system being in a given state. Any help would be appreciated.
-
$\begingroup$ Is this the sort of thing? $\endgroup$– cormullionJun 12, 2013 at 14:33
-
4$\begingroup$ Here's a tutorial on fitting hidden markov models in Mathematica including an example applied to financial data. ams.sunysb.edu/~frey/QuantitativeFinance/Resources/… $\endgroup$– bill sJun 12, 2013 at 14:49
-
2$\begingroup$ @Tox If you want to simulate paths this might be useful. $\endgroup$– RodJun 12, 2013 at 15:08
-
2$\begingroup$ This needs a v10 answer :) $\endgroup$– RojoJul 13, 2014 at 0:03
2 Answers
Mathematica V10 introduced the following two functions:
- HiddenMarkovProcess
- FindHiddenMarkovStates
Examples of their usage can be found here and here.
I've also used HiddenMarkovProcess[]
here: Detecting components in timeseries.
Thanks. I also found that there is a package with inbuilt functions, although super pricey, at http://scientificcomputing.blogspot.co.uk/2006/02/statistical-inference-package-for.html