## 5 Ensemble Hidden Markov Model (EHMM)  
HMM is a probabilistic ranking classifier that assigns a tag to each observational segment in a sequence. As a result, it determines the probability distribution over the set of observations and produces the sequence of observations that is most probable [10,12]. Because of this, it is able to model and categorise the set of observations derived from this credit card transaction with ease. There are various forms of HMMs; however, this article employs the ergodic HMM, which permits transitions between states without any transition probabilities being zero [12]. In general, an HMM consist of the following components. 1. The number of the transition states, \(s\). 2. The sequence of observation, \(Q=\{q_{1},q_{2},\ldots,q_{z}\}\), where \(z\) is the number of observation which determines the output of the modelled system. 3. The transition probability matrix, \(\rho\): The transition probability between two states, \(s_{1}\) and \(s_{2}\), is denoted as \(\rho=\rho_{s_{1},s_{2}}\). Thus, \(\rho\) is the probability of moving from state \(s_{1}\) to \(s_{2}\). It is important to note that the likelihood of transitioning from state \(s_{1}\) to \(s_{2}\) is only determined by the present state \(s_{1}\), not by any previous state. Mathematically, \(\rho\) is of the form of an \(s\times s\) matrix given as: \[\rho= \begin{pmatrix}\rho_{1,1}&\rho_{1,2}&\ldots&\rho_{1,s}\\ \rho_{2,1}&\rho_{2,2}&\ldots&\rho_{2,s}\\ \vdots&\vdots&\ddots&\vdots\\ \rho_{s,1}&\rho_{s,2}&\ldots&\rho_{s,s}\end{pmatrix} .\] (18)
4. Gaussian emission distribution parameters, \(\phi\): The probability of emitting an observation from a particular state \(s\) is determined by \(\phi\). Mathematically, \(\phi\) is of the form of an \(s\times z\) matrix given as \[\phi= \begin{pmatrix}\phi_{1,1}&\phi_{1,2}&\ldots&\phi_{1,z}\\ \phi_{2,1}&\phi_{2,2}&\ldots&\phi_{2,z}\\ \vdots&\vdots&\ddots&\vdots\\ \phi_{s,1}&\phi_{s,2}&\ldots&\phi_{s,z}\end{pmatrix} .\] (19) \(\phi\) consist of three important parameters; namely, the mean \(M\), covariance matrix \(\sum\), and mixture weight \(\beta\), represented as \(\phi=\{M,\sum,\beta\}\). 5. The start probability, \(\
u=\{v_{1},v_{2},\ldots,v_{z}\}\): \(\
u\) indicates the beginning of the Gaussian distribution process. \(\
u\) always adds up to 1 at every point of the distribution process. That is, \[\sum_{1}^{z}v_{z}=1\] (20) As a result, a given HMM can be represented using these three parameters as: \[\mathcal{H}=\{\
u,\rho,\psi\}\] (21)In applying HMMs, three primary problems are typically addressed to find the optimal sequence of observations:  
1. Computing the observation probability: The HMM uses an observation sequence, \(Q=\{q_{1},q_{2},\ldots,q_{z}\}\), and a known model, \(\mathcal{H}=\{v,\rho,\psi\}\), to estimate the likelihood of a specific sequence of observations. 2. Computing the model parameters (Training): During this phase, HMM selects the model that best fits the input data. The HMM parameters, \(\mathcal{H}=\{v,\rho,\psi\}\), are continually re-estimated to maximize the likelihood of each observation sequence. Maximum likelihood estimation (MLE) techniques like the Baum-Welch algorithm [31] can be used for this process. The Baum-Welch algorithm iteratively optimizes the HMM parameters, \(\mathcal{H}=\{v,\rho,\psi\}\), based on the Gaussian emission distribution parameters, \(\phi=\{M,\sum,\beta\}\) until the condition is satisfied. The Gaussian emission distribution parameters, \(\phi=\{M,\sum,\beta\}\), are used in the MLE process. These Gaussian parameters, \(\phi\), assume random values or flat values at the start of the MLE process. However, HMMs are sensitive to flat start or random values of the Gaussian parameters \(M\), \(\sum\), and \(\beta\) because it limits the prediction performance of the model in general. Accordingly, the K-MC [15; 16] and GMM [17; 18] techniques are sequentially used to initialise the Gaussian emission parameters.