## 2 Model Framework and Methodology
### Hierarchical Dirichlet Process (HDP)-HMM  
The HDP-HMM is a nonparametric Bayesian approach to extend HMM to infinite state space. The HDP prior over an infinite state space requires a brief overview of the Dirichlet process. Figure 3 shows the generative model for HDP-HMM, where \(Z_{t}\) shows the hidden state sequence, \(Y_{t}\) represents the observation sequence and is drawn from the observation distribution, \(f\). The HDP prior over infinite transition matrices has each \(\pi_{j}\) as a Dirichlet process draw depicting the transition distribution from \(j\). The Dirichlet process, \(DRP\) (\(\gamma\), \(H\)), is a stochastic process consisting of a set of discrete probability distributions. Here, \(\gamma\) is a scalar parameter known as the concentration parameter, and \(H\) is the and base distribution with parameter space \(\theta\).  
A sample from the Dirichlet process is a distribution over \(\theta\) and is defined as \(G_{0}\), given by  
\[G_{0}\sim DRP(\gamma,\;H), \tag{7}\]  
\[G_{0}(\theta)=\sum_{k=1}^{\infty}\beta_{k}\delta(\theta-\theta_{k}) \tag{8}\]  
\[\theta_{k}\sim\;H,\;k=1,\ldots,\infty,\;\beta\sim GEM(\gamma) \tag{9}\]To obtain a discrete set of locations, repeated sampling of the base measure, \(H\), is carried out, and location weights are obtained using the stick-breaking process denoted as GEM(\(\gamma\)) and GEM (from Griffiths, [PERSON], and [PERSON]) [32], and \(\theta_{k}\) is the state-specific observation distribution parameter. The weight vector, \(\beta_{k}\), given by  
\[\beta_{k}=\beta_{k}^{\prime}\prod_{I=1}^{k-1}(1-\beta_{I}^{\prime}) \tag{10}\]  
\[\beta_{k}^{\prime}\sim GEM(\gamma) \tag{11}\]  
Equation (10) represents the division of a unit length stick by weights, \(\beta_{k}\). The \(k\)th weight is a random proportion \(\beta^{\prime}_{k}\) of the remaining stick after the previous (\(k-1\)) weights have been defined. Subsequently, the random draw \(G\sim DRP\) (\(\gamma\), \(H\)) with a probability of one can be expressed as [32]  
\[G_{j}=\sum_{k=1}^{K}\tau_{jk}\delta(\theta-\theta_{k})\ K\rightarrow\infty \tag{12}\]  
\[\theta_{k}\sim H,\ \tau_{j}\sim DRP(\alpha,\beta),\ \beta\sim GEM(\gamma) \tag{13}\]  
where the notation \(\delta\) (\(\theta-\theta_{k}\)) indicates a Dirac delta at \(\theta=\theta_{k}\). From this definition, it is evident that the DRP defines a distribution over a discrete probability measure. The HDP then consists of (at least) two layers of DRP as shown in Figure 3, which can be expressed as  
\[G_{j}\sim HDP(\gamma,\alpha,H) \tag{14}\]  
\[G_{0}\sim DRP(\gamma,H) \tag{15}\]  
where \(\gamma\) is the concentration parameter for upper-level DRP and \(\alpha\) is the concentration parameter for the lower-level DRP. Since \(G_{j}\) is discrete, \(G_{0}\) is also discrete. Equations (12)-(15) represent the hierarchical sampling of \(G_{j}\) values from \(G_{0}\). The DRP and HDP are used to generate priors for data likelihood parameters. These priors are further used for estimating the value of the HMM parameters. The state transition distribution in the sticky HDP-HMM is then given by  
Figure 3: State-space diagram representative of the sticky HDP-HMM with DRP prior and state-specific transition distributions.  
\[\pi_{j}\alpha,\beta\sim\left(\alpha+s,\frac{\alpha\beta+s\delta_{j}}{\alpha+s}\right) \tag{16}\]  
where \(s\) is the sticky parameter. The next section explains the sticky HDP-HMM is overcoming the limitations (i.e., parametric treatment for transition and emission distributions) of the standard HMM and HDP-HMM.