Hidden Markov Model
A hidden Markov model describes a sequence of observations as generated by an unobserved Markov chain of states, each with its own emission distribution.
은닉 마르코프 모형은 관측되지 않는 상태들의 마르코프 연쇄가 상태마다 다른 방출분포로 관측값을 생성한다고 보는 모형입니다.
Does my sequence switch between a few hidden regimes, how many are there, and when is it in each one?
제 시계열이 몇 개의 숨은 국면 사이를 오가는지, 국면이 몇 개이며 언제 어느 국면에 있는지 알고 싶어요.
The hidden Markov model is fitted by Baum-Welch expectation-maximisation, which estimates the transition probabilities and the Gaussian, Poisson or categorical emission parameters of each state. The number of states is chosen by BIC, Viterbi decoding gives the most likely state path, and forward-backward posteriors show how certain each assignment is.
When to use Hidden Markov Model
- A sequence appears to alternate between a few regimes with different levels or distributions
- You want regime durations and switching probabilities
- You have one long sequence or several sequences identified by a unit column
When to use something else
- The states are observed: use Markov Chain Transition Analysis
- Regimes are defined by an observed threshold variable: use Threshold Autoregression (SETAR)
Assumptions and requirements
- Observations are independent given the hidden state
- The state sequence is a first-order homogeneous Markov chain
- The emission family suits the outcome (Gaussian, Poisson or categorical)
What the analysis reports
- State parameters, stationary probabilities and expected durations
- Transition matrix
- BIC for each number of states
- Viterbi state shares, number of switches and mean posterior certainty
- Plot of the decoded state path
How to report it
A [K]-state hidden Markov model with Gaussian emissions was selected by BIC (BIC = [value], N = [n]); state means were [value] and [value], and the probabilities of remaining in each state were [value] and [value].
Related methods
- Markov Chain Transition Analysis
- Markov-Switching Regression Model
- Latent Class Analysis
How this method is validated
이 방법의 검증 근거
- Independent computation. 1 reference test compares the results with direct computations (formulas, enumeration or simulation).
독립 계산. 직접 계산(식·열거·모의실험) 대조 참조 시험 1건 통과.
Tolerances are relative differences (absolute differences for values near zero). R comparisons and reference tests are re-run before each release of the analysis engine.
허용오차는 상대 차이입니다(0 근처 값은 절대 차이). R 대조와 참조 시험은 분석 엔진을 배포할 때마다 다시 돌립니다.
Run Hidden Markov Model on Quorant
- Data you need
- a table (CSV or Excel) with an outcome variable and a time variable
- Price
- 600 credits for one analysis up to 10,000 rows (complexity level 4); larger or wider data costs more. Optional methodologist review: 2400 credits.
- Checking
- Compared with independent computations
- Before you pay
- A free pre-analysis diagnosis checks your data and gives an exact quote; nothing is deducted until you approve it.