## 2 Model Framework and Methodology
### Sticky (HDP)-Hmm  
The HDP-HMM is also known as a Bayesian HMM or infinite HMM because it represents the same framework that models the transitions among hidden states given the observations generated by those states. The HMM assumes that the state at any time \(t\) is independent of all the previous states before time (\(t-1\)) and depends only on the state at a time (\(t-1\)). In the HMM, the observations belonging to the discrete hidden states can either be discrete or continuous. The need for sticky HDP-HMM over HMM and HDP-HMM is discussed next. The realization of the number of hidden states (\(K\)) is a prerequisite to learn HMM. The HDP-HMM works with an infinite state space but has unrealistic fast dynamics allowing state sequences to have a much wider posterior probability. In other words, HDP-HMM does not differentiate its self-transitions from transitions between different states. In such a case, the identifications on observation of a model with redundant states can be hindered. In contrast, the DRP-HMM relaxes this limitation by providing a prior over the infinite states with infinite transition matrices. Thus, with the limitations of HMM and HDP-HMM, the sticky HDP-HMM appears to be an elegant Bayesian model for an infinite number of states for any given practical data set. Any draw from \(DRP\) (\(\gamma,H\)) is a discrete distribution that helps to build the DRP-HMM such that the emission parameters define the distribution, \(H\), and the \(DRP\) (\(\gamma,H\)) defines the infinite subsets of the parameters. Thus, \(DRP\) (\(\gamma,H\)) represents a prior over each infinite transition matrix row as a separate draw from the Dirichlet process (DP). However, there is a chance that if \(H\) is a continuous distribution, the transition matrix progress through unique states (that have never occurred before) for all the transitions, which limits the DRP suitability to many applications. Therefore, the HDP replaces the continuous distribution of \(H\) with the discrete distribution, \(H^{\prime}\), by drawing from the upper-level DRP and forcing the lower-level DRP to generate an output distribution with the same parameters. Thus, the HDP interpretation after applying it to Markov chain can be expressed as  
\[Z_{1:T},\ p(Z_{1}:T)\ =\ p(Z_{1})\prod\
olimits_{t}^{T}=2^{p}(Z_{t}|Z_{t-1}) \tag{17}\]  
where \(Z_{t}\) denotes the state of oil at time \(t\) and \(T\) is the number of observations. Then, the transition matrix \(\lambda_{\text{j}}\) as one separate row of the Markov chain is given by  
\[\lambda_{j}=\left\{\lambda_{jk}\right\},\ k=1\ldots K \tag{18}\]  
Though HDP-HMM can give specific priors to the transition matrices, it is not enough, as in some cases, the changes in the hidden states are negligible. HDP-HMM also has limitations, namely, over segmentation of data, creating redundant states, rapid switching among states, and inability to differentiate self-transition from transitions between different states [32]. These limitations might cause erroneous estimation of state space and transition probabilities in a small data set scenario. Therefore, a weightage parameter \(s\) is introduced to avert rapid switching among redundant states, as shown in Equation (16). From Equations (11) and (16), the more intuitive transition distribution can now be written as  
\[\pi_{j}\alpha,\beta\sim\left(\alpha+s,\frac{\alpha\ GEM(\gamma)+s\delta_{j}}{ \alpha+s}\right) \tag{19}\]The above formulation is the sticky HDP-HMM and is based on the stick-breaking process as defined in the previous DRP section. Figure 4 illustrates the state-space diagram for the sticky HDP-HMM with DRP emissions. Equation (19) infers the states for the simulated degradation data set plotted in Figure 2. In the HDP and the HDP-HMM, inference and learning are usually achieved simultaneously by estimating the posterior distribution of the parameters and hidden variables. Our aim is to decode \(Z_{t}\) hidden variables.