tokens: Hidden Markov models ( HMM ) consists of four elements : 1 ) an exhaustive set of different states , which in our case represent the different of segments of the ECG ; 2 ) baseline probabilities of the states , reflecting the relative duration of the various segments ; 3 ) the probability of moving from one state to another , which is captured in a transition probability matrix ; and 4 ) an emission probability matrix .