Hidden Markov Models applied to Data Mining

Final task for the course Data Mining, BISS 2006, prof.sa Rosa Meo. 1 Stochastic Finite State Automata (SFSA) In this section we analyse the Hidden Markov Models (HMM) as part of a larger theory, the automata theory, as suggested in [2]. This allows us to show on one hand the relations between these models and others which are well-known pointing out similar and different aspects, on the other to point intuitively out the main advantages and the application fields of HMM. Before introducing formally Stochastic Finite State Automata we consider useful, especially for the clearness of the notation, recalling the classic definition of finite state automaton as given in [6]. Definition 1 (Finite State Automata) A Finite State Automaton (FSA)M is an abstract machine consisting of: – A set of states Q = {I, 1, . , k, . , K, F} including the initial state I and the final state F (accepting state) – A set Y of input symbols. – A set Z of output symbols. – A state transition function f . If qt is the state of the automaton M at time t then qt = f(yt, qt−1). – An emission function g. In the Mealy automata the emission function depends on the transition between states, i.e. if zt is the automaton output at time t, zt = g(qt, qt−1); In the Moore automata the emission function depends only on the current automaton state, i.e. zt = g(qt). Clearly we know that the Mealy automata class is equivalent to the Moore automata one. We just add some notes on the given definition. In the automata theory it is usually introduced a more accurate definition than the one we have just given, for example by the definition of the input and output alphabet. In this paper, considering the applications we are going to explore, we try to pay our attention 1 The definition can be extended considering more initial states and/or more final states. just on the main aspects. For example in the speech recognition applications, the input and the output symbols are vectors with real number components which are the result of the spectral analysis of an acoustic signal at a given time, while in the pattern recognition applications we still have a discrete input and output alphabet. Another important note, is that the determinism of the automata is given by the determinism of the transition function f and the emission function g. When the emission function or the transition function are probabilistic, then we are treating a stochastic automaton. Markov Models (MM) In [2] the authors suggests that the classic Markov Models can be seen as SFSA with a probabilistic transition function and a deterministic emission function (the identity) depending on the current state. The probability of observing the automaton in the state q at time t depends only on the state of the model at time t − 1. This feature of the transition law means that the MM are memoryless. We can consider the state of the chain as the emission function. With MM we can introduce and give the solution of two interesting problems: 1. Given a sequence consisting of T states X = x1 . xT and a Markov Model M, which is the probability that, starting from the initial state I, M gives X as sequence of output symbols and then it terminates? 2. Let us consider the Markov Model M with K states. We can represent the transition probability between states as a K×K dimension matrix P whose element pij represents the probability of observing the state j just after i. Formally if λ represents the parameters associated to M, i.e. the probability transition matrix, then the problem consists in estimating, given one or more training sequences as training set, λ∗ = arg maxλ p(X|M, λ). Both these problems have an easy solution. In the first case, noting that the requested sequence is the exact sequence of states of the Markov Model, we have that the probability of observing X = x1x2 . xT is: p(X) = p(F |xT )p(x1|I) T ∏