1
$\begingroup$

I'm using EstimatedProcess to simulate a HiddenMarkovProcess with two states using data derived from different ARIMA processes

EstimatedProcess[data, HiddenMarkovProcess[2, "Gaussian"]]

Are there other options for specifying the distribution of the HiddenMarkovProcess besides "Gaussian"? I can't find a list of the other options in Mathematica's documentation.

Thanks

$\endgroup$
7
  • 1
    $\begingroup$ One of the examples under Scope/Estimates of HiddenMarkovProcess gives an example for the Exponential distribution. I appears that you can specify the name of any distribution (and that might likely include any "constructed" distribution using TransformedDistribution, etc.). $\endgroup$
    – JimB
    Apr 18, 2022 at 4:28
  • $\begingroup$ When I insert the string Guassian I'm really just telling it use a single NormalDistribution[a,b] or is it using a family of Normal Distributions? $\endgroup$ Apr 18, 2022 at 15:17
  • $\begingroup$ Yes. Just try EstimatedProcess[data, HiddenMarkovProcess[2, "Gaussian"]] and EstimatedProcess[data, HiddenMarkovProcess[2, NormalDistribution[a, b]]] on the HiddenMarkovProcess/Scope/Estimation example. $\endgroup$
    – JimB
    Apr 18, 2022 at 15:34
  • 1
    $\begingroup$ Thinking about if this question should be closed: In a way the answer "can be found" in the documentation but maybe "easily found" is not correct. Also, using NormalDistribution[a, b], NormalDistribution[103.2, b], and NormalDistribution[a, 17.6] give exactly the same output but NormalDistribution[0, 1] results in an error. So certainly more online documentation would be welcomed. Also, there are no measures of precision given which for me makes the result being of unknown value (except for getting starting values for a function the does give estimates of precision). $\endgroup$
    – JimB
    Apr 18, 2022 at 17:31
  • $\begingroup$ I tried to do SkewedNormalDistrubution[a,b,c] and it did not work. It was taking an extremely long time. They need to work on this feature more. $\endgroup$ Apr 18, 2022 at 21:52

1 Answer 1

0
$\begingroup$

It might be a little too late and also I am not claiming that it is the correct way, statistically speaking, for the HMM set-up. I am only presenting a possible programmatic way of answering the OP's question.

(*produce fake data*)
data = RandomVariate[NormalDistribution[0,1],100];

(*estimate the parameters of the first pdf you want*)
paramsP = 
 FindDistributionParameters[data, 
  StableDistribution[1, Subscript[\[Alpha], p], Subscript[\[Beta], p],
    Subscript[\[Mu], p], Subscript[\[Sigma], p]]]

(*estimate the parameters of the second pdf you want*)
paramsN = 
 FindDistributionParameters[data, 
  StableDistribution[1, Subscript[\[Alpha], n], Subscript[\[Beta], n],
    Subscript[\[Mu], n], Subscript[\[Sigma], n]]]

(*define the HMM set-up*)

class = HiddenMarkovProcess[{1/2, 
   1/2}, {{0.5, 0.5}, {0.5, 
    0.5}}, {StableDistribution[1, Subscript[\[Alpha], p], 
     Subscript[\[Beta], p], Subscript[\[Mu], p], Subscript[\[Sigma], 
     p]] /. paramsP, 
   StableDistribution[1, Subscript[\[Alpha], n], Subscript[\[Beta], 
     n], Subscript[\[Mu], n], Subscript[\[Sigma], n]] /. paramsN}]

(*estimate the HMM process*)
hmm = EstimatedProcess[data, class]

(*find the States*)
foundStates = FindHiddenMarkovStates[data, hmm, "PosteriorDecoding"]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.