Hidden Markov Models Ellen Walker Bioinformatics Hiram College, 2008.

Slides:



Advertisements
Similar presentations
Large Vocabulary Unconstrained Handwriting Recognition J Subrahmonia Pen Technologies IBM T J Watson Research Center.
Advertisements

Finite Automata CPSC 388 Ellen Walker Hiram College.
Hidden Markov Model.
1 Hidden Markov Model Xiaole Shirley Liu STAT115, STAT215, BIO298, BIST520.
Hidden Markov Models Chapter 11. CG “islands” The dinucleotide “CG” is rare –C in a “CG” often gets “methylated” and the resulting C then mutates to T.
Hidden Markov Models.
Bioinformatics Hidden Markov Models. Markov Random Processes n A random sequence has the Markov property if its distribution is determined solely by its.
Introduction to Hidden Markov Models
Hidden Markov Models.
Hidden Markov Models Bonnie Dorr Christof Monz CMSC 723: Introduction to Computational Linguistics Lecture 5 October 6, 2004.
 CpG is a pair of nucleotides C and G, appearing successively, in this order, along one DNA strand.  CpG islands are particular short subsequences in.
Patterns, Profiles, and Multiple Alignment.
Hidden Markov Models Modified from:
Profiles for Sequences
Hidden Markov Models Theory By Johan Walters (SR 2003)
1 Hidden Markov Models (HMMs) Probabilistic Automata Ubiquitous in Speech/Speaker Recognition/Verification Suitable for modelling phenomena which are dynamic.
Hidden Markov Models Fundamentals and applications to bioinformatics.
Lecture 15 Hidden Markov Models Dr. Jianjun Hu mleg.cse.sc.edu/edu/csce833 CSCE833 Machine Learning University of South Carolina Department of Computer.
Hidden Markov Models 1 2 K … 1 2 K … 1 2 K … … … … 1 2 K … x1x1 x2x2 x3x3 xKxK 2 1 K 2.
Hidden Markov Models (HMMs) Steven Salzberg CMSC 828H, Univ. of Maryland Fall 2010.
GS 540 week 6. HMM basics Given a sequence, and state parameters: – Each possible path through the states has a certain probability of emitting the sequence.
Hidden Markov Model 11/28/07. Bayes Rule The posterior distribution Select k with the largest posterior distribution. Minimizes the average misclassification.
Hidden Markov Models. Two learning scenarios 1.Estimation when the “right answer” is known Examples: GIVEN:a genomic region x = x 1 …x 1,000,000 where.
Hidden Markov Models Pairwise Alignments. Hidden Markov Models Finite state automata with multiple states as a convenient description of complex dynamic.
Hidden Markov Models. Two learning scenarios 1.Estimation when the “right answer” is known Examples: GIVEN:a genomic region x = x 1 …x 1,000,000 where.
Hidden Markov Models I Biology 162 Computational Genetics Todd Vision 14 Sep 2004.
Hidden Markov Models Lecture 5, Tuesday April 15, 2003.
HIDDEN MARKOV MODELS IN MULTIPLE ALIGNMENT. 2 HMM Architecture Markov Chains What is a Hidden Markov Model(HMM)? Components of HMM Problems of HMMs.
Hidden Markov Models 1 2 K … 1 2 K … 1 2 K … … … … 1 2 K … x1x1 x2x2 x3x3 xKxK 2 1 K 2.
Hidden Markov Models 1 2 K … 1 2 K … 1 2 K … … … … 1 2 K … x1x1 x2x2 x3x3 xKxK 2 1 K 2.
Lecture 5: Learning models using EM
S. Maarschalkerweerd & A. Tjhang1 Parameter estimation for HMMs, Baum-Welch algorithm, Model topology, Numerical stability Chapter
Hidden Markov Models Lecture 5, Tuesday April 15, 2003.
Hidden Markov Models K 1 … 2. Outline Hidden Markov Models – Formalism The Three Basic Problems of HMMs Solutions Applications of HMMs for Automatic Speech.
Lecture 9 Hidden Markov Models BioE 480 Sept 21, 2004.
Hidden Markov Models 1 2 K … x1 x2 x3 xK.
Bioinformatics Hidden Markov Models. Markov Random Processes n A random sequence has the Markov property if its distribution is determined solely by its.
Elze de Groot1 Parameter estimation for HMMs, Baum-Welch algorithm, Model topology, Numerical stability Chapter
Hidden Markov Models.
Doug Downey, adapted from Bryan Pardo,Northwestern University
Hidden Markov models Sushmita Roy BMI/CS 576 Oct 16 th, 2014.
Learning HMM parameters Sushmita Roy BMI/CS 576 Oct 21 st, 2014.
CS262 Lecture 5, Win07, Batzoglou Hidden Markov Models 1 2 K … 1 2 K … 1 2 K … … … … 1 2 K … x1x1 x2x2 x3x3 xKxK 2 1 K 2.
Class 5 Hidden Markov models. Markov chains Read Durbin, chapters 1 and 3 Time is divided into discrete intervals, t i At time t, system is in one of.
1 Markov Chains. 2 Hidden Markov Models 3 Review Markov Chain can solve the CpG island finding problem Positive model, negative model Length? Solution:
HMM Hidden Markov Model Hidden Markov Model. CpG islands CpG islands In human genome, CG dinucleotides are relatively rare In human genome, CG dinucleotides.
CSCE555 Bioinformatics Lecture 6 Hidden Markov Models Meeting: MW 4:00PM-5:15PM SWGN2A21 Instructor: Dr. Jianjun Hu Course page:
Gene finding with GeneMark.HMM (Lukashin & Borodovsky, 1997 ) CS 466 Saurabh Sinha.
Hidden Markov Models for Sequence Analysis 4
Fundamentals of Hidden Markov Model Mehmet Yunus Dönmez.
H IDDEN M ARKOV M ODELS. O VERVIEW Markov models Hidden Markov models(HMM) Issues Regarding HMM Algorithmic approach to Issues of HMM.
Hidden Markov Models Yves Moreau Katholieke Universiteit Leuven.
Hidden Markov Models Usman Roshan CS 675 Machine Learning.
HMMs for alignments & Sequence pattern discovery I519 Introduction to Bioinformatics.
S. Salzberg CMSC 828N 1 Three classic HMM problems 2.Decoding: given a model and an output sequence, what is the most likely state sequence through the.
PGM 2003/04 Tirgul 2 Hidden Markov Models. Introduction Hidden Markov Models (HMM) are one of the most common form of probabilistic graphical models,
Hidden Markov Models 1 2 K … 1 2 K … 1 2 K … … … … 1 2 K … x1x1 x2x2 x3x3 xKxK 2 1 K 2.
Hidden Markovian Model. Some Definitions Finite automation is defined by a set of states, and a set of transitions between states that are taken based.
Algorithms in Computational Biology11Department of Mathematics & Computer Science Algorithms in Computational Biology Markov Chains and Hidden Markov Model.
Hidden Markov Models (HMMs) –probabilistic models for learning patterns in sequences (e.g. DNA, speech, weather, cards...) (2 nd order model)
ECE 8443 – Pattern Recognition ECE 8527 – Introduction to Machine Learning and Pattern Recognition Objectives: Reestimation Equations Continuous Distributions.
Hidden Markov Model Parameter Estimation BMI/CS 576 Colin Dewey Fall 2015.
Definition of the Hidden Markov Model A Seminar Speech Recognition presentation A Seminar Speech Recognition presentation October 24 th 2002 Pieter Bas.
Visual Recognition Tutorial1 Markov models Hidden Markov models Forward/Backward algorithm Viterbi algorithm Baum-Welch estimation algorithm Hidden.
1 Hidden Markov Model Xiaole Shirley Liu STAT115, STAT215.
Hidden Markov Models – Concepts 1 2 K … 1 2 K … 1 2 K … … … … 1 2 K … x1x1 x2x2 x3x3 xKxK 2 1 K 2.
Hidden Markov Models BMI/CS 576
Hidden Markov Models - Training
CSCI 5822 Probabilistic Models of Human and Machine Learning
CSE 5290: Algorithms for Bioinformatics Fall 2009
Presentation transcript:

Hidden Markov Models Ellen Walker Bioinformatics Hiram College, 2008

State Machine to Recognize “AUG” transition Start state Final state Each character causes a transition to the next state

“AUG” anywhere in a string

“AUG” in frame

Deterministic Finite Automaton (DFA) States –One start state –One or more accept states Transitions –For every state, for every character Outputs –Optional: states can emit outputs, e.g. “Stop” at accept state

Why DFAs? Every regular expression has an associated state machine that recognizes it (and vice versa) State machines are easy to implement in very low level code (or hardware) Sometimes the state machine is easier to describe than the regular expression

Hidden Markov Models Also a form of state machine Transitions based on probabilities, not inputs Every state has (probabilistic) output (or emission) “Hidden” because only emissions are visible, not states or transitions

HMM vs. DFA DFA is deterministic –Each decision (which state next? What to output?) is fully determined by the input string HMM is probabilistic –HMM makes both decisions based on probability distributions

HMM vs. DFA (2) DFA model is explicit and used directly like a program. HMM model must be inferred from data. Only emissions (outputs) can be observed. States and transitions, as well as the probability distributions for transitions and outputs are hidden.

HMM Example: Fair Bet Casino The casino has two coins, a Fair coin (F) and a Biased coin (B) –Fair coin has 50% H, 50% T –Biased coin has 75% H, 25% T Before each flip, with probability 10%, the dealer will switch coins. Can you tell, based only on a sequence of H and T which coin is used when?

“Fair Bet Casino” HMM Image from Jones & Pevner 2004

The Decoding Problem Given an HMM and a sequence of outputs, what is the most likely path through the HMM that generated the outputs?

Viterbi Algorithm Uses dynamic programming Starting point: –When the output string is “”, the most likely state is the start state (and there is no path) Taking a step: –Likelihood of this state is maximum of all ways to get here, measured as: Likelihood of previous state * Likelihood of transition to this state * Likelihood of output from this state

Example: “HHT” Initial -> F –Prev= 1, Trans = 0.5, Out=0.5, total = 0.25 Initial -> B –Prev =1, Trans = 0.5, Out=0.75, total = Result: F = 0.25, B=0.375

Example: “HHT” F -> F –Prev=0.25, Trans = 0.9, Out=0.5, total = B -> F –Prev=0.375, Trans = 0.1, Out=0.5, total = F -> B –Prev =.25, Trans = 0.1, Out=0.75, total = B -> B –Prev =.375, Trans = 0.9, Out=0.75, total = Result: F = , B=

Example: HHT F -> F –Prev=.1125, Trans = 0.9, Out=0.5, total = B -> F –Prev= , Trans = 0.1, Out=0.5, total = F -> B –Prev =.1125, Trans = 0.1, Out=0.25, total = B -> B –Prev= , Trans = 0.9, Out=0.25, total = Result: F = , B=0.0570

Tracing Back Pick the highest result from the last step, follow the highest transition from each previous step (just like Smith- Waterman) Result: initial->B->B->B Biased coin always used What if the next flip is T?

Log Probabilities Probabilities are increasingly small, as you multiply numbers less than one Computers have limits to precision Therefore, it’s better to use a log probability format 1/10*1/10 = 1/100 (10 -1 *10 -1 = ) = -2

GC Rich Islands A GC Rich Island is an area of a genome where GC content is significantly greater than the genome as a whole GC Rich Islands are like Biased Coins Can recognize them using the same HMM –GC content is p(H) for fair coin –Larger number is p(H) for biased coin –Estimate probability of entering vs. leaving GC Rich island for “changing coin” probability

Probability of State Sequence, Given Output Sequence Given HMM and output string, what is probability that HMM is in state S at time t? –Forward: similar formulation as decoding problem, except take sum of all paths, instead of max of all paths (times from 0 to t-1) –Backward: similar, but work from end of string (times from t+1 to end of sequence

Parameter Estimation Given many strings, what are the parameters of the HMM that generated them? –Assume we know the states and transitions, but not the probabilities of transitions or outputs –This is an optimization problem

Characteristics of an Optimization Problem Each potential solution has a “goodness” value (in this case, probability) We want the best solution Perfect answer: try all possibilities (not usually possible) Good, but not perfect answer: use a heuristic

Hill Climbing (an Optimization Heuristic) Start with a solution (could be random) Consider one or more “steps”, or perturbations to the solution Choose the “step” that most improves the score Repeat until the score is good enough, or no better score can be reached

Hill Climbing for HMM Guess a state sequence Using the string(s), estimate transition and emission probabilities Using the probabilities, generate a new state sequence using the decoding algorithm Repeat until the sequence stabilizes

HMM for Sequence Profiles Three kinds of states: –Insertion –Deletion –Match Probability estimations indicate how often each occurs Logos are direct representations of HMMs in this format