Guide to using HMM Algorithm



Start Year

Insert the data start date

Start Month

Insert the start month of the data

Start Day

Insert the start month of the data


Number of observations back in time to use for fitting the HMM (including the

current observation)

Range of Data(min)

Insert the beginning of range under review

Range of Data(max)

Insert the end of the range under review


If the time unit is weekly, select the number 52 and if the time unit is monthly,

select the number 12


Boolean stating whether a linear time trend exists

Choose xlsx File

In this section, upload the data file.


Hidden Markov Model

Strat and Karat (1999) proposed the use of Hidden Markov models (HMM) for monitoring
epidemiological data. HMM have previously been used in many fields, including
electrocardiographic signal analysis, seizure frequency analysis in epilepsy, and meteorology. The main idea of this method is that it divides the time series of registered diseases into two parts, the epidemic period and the non epidemic period. Assume that yt for t = 1. 2. ⋯ . n is an observed value of the random process Y = (Yt; t = 1. 2. ⋯ . n) and is associated with a hidden variable such as Stthat defines the conditional distribution of Y. If St = j, the conditional distribution of Yt has density :

so that fjt is a predetermined density such as Poisson or Gaussian distribution and θj is a parameter to be estimated. It is assumed that the hidden sequence St for t = 1. 2. ⋯ . n follows a two-state homogeneous Markov chain of order one with the following fixed transition probabilities

For example, suppose that yt is the observed incidence rate of Influenza-like Illness (ILI) in week t and there are two distributions corresponding to the incidence rate of ILI in the epidemic and non-epidemic periods; p01 for j = 0. 1 is the probability of changing from the non-epidemic period to the epidemic period.

Le Strat, Y., & Carrat, F. (1999). Monitoring epidemiologic surveillance data using hidden Markov models. Statistics in medicine, 18(24), 3463-3478

– Designing a set of evaluation tools for outbreak detection algorithms in the timely discovery of single-source and progressive epidemics. doctorate thesis Hamedan University of Medical Sciences.