I didn't find any out-of-box implementation available for ARHMM in MATLAB, but in order to implement it in MATLAB, you can follow the below steps:
- Define the number of hidden states, the order of the AR process, and initialize the transition matrix, emission parameters (AR coefficients), and state probabilities.
- Use the Expectation-Maximization algorithm to iteratively estimate the parameters of the ARHMM.
- Use the Forward-Backward algorithm to compute the probabilities of the hidden states given the observed data.
- Update the AR coefficients and transition probabilities based on the results of the EM algorithm.
I hope this will help you to proceed ahead with your workflow :)