Marjolijn Elsinga & Elze de Groot1 Markov Chains and Hidden Markov Models Marjolijn Elsinga & Elze de Groot.

Slides:



Advertisements
Similar presentations
. Markov Chains. 2 Dependencies along the genome In previous classes we assumed every letter in a sequence is sampled randomly from some distribution.
Advertisements

Hidden Markov Model in Biological Sequence Analysis – Part 2
HMM II: Parameter Estimation. Reminder: Hidden Markov Model Markov Chain transition probabilities: p(S i+1 = t|S i = s) = a st Emission probabilities:
Learning HMM parameters
Hidden Markov Model.
Rolling Dice Data Analysis - Hidden Markov Model Danielle Tan Haolin Zhu.
Lecture 8: Hidden Markov Models (HMMs) Michael Gutkin Shlomi Haba Prepared by Originally presented at Yaakov Stein’s DSPCSP Seminar, spring 2002 Modified.
Bioinformatics Hidden Markov Models. Markov Random Processes n A random sequence has the Markov property if its distribution is determined solely by its.
Hidden Markov Models Eine Einführung.
Hidden Markov Models.
Markov Models Charles Yan Markov Chains A Markov process is a stochastic process (random process) in which the probability distribution of the.
 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.
Hidden Markov Models Modified from:
Statistical NLP: Lecture 11
Hidden Markov Models Theory By Johan Walters (SR 2003)
Hidden Markov Models Fundamentals and applications to bioinformatics.
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. Decoding GIVEN x = x 1 x 2 ……x N We want to find  =  1, ……,  N, such that P[ x,  ] is maximized  * = argmax  P[ x,  ] We.
Markov Models Charles Yan Spring Markov Models.
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 Lecture 6, Thursday April 17, 2003.
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 1 2 K … 1 2 K … 1 2 K … … … … 1 2 K … x1x1 x2x2 x3x3 xKxK 2 1 K 2.
. Parameter Estimation For HMM Background Readings: Chapter 3.3 in the book, Biological Sequence Analysis, Durbin et al., 2001.
Hidden Markov Models 1 2 K … 1 2 K … 1 2 K … … … … 1 2 K … x1x1 x2x2 x3x3 xKxK 2 1 K 2.
S. Maarschalkerweerd & A. Tjhang1 Parameter estimation for HMMs, Baum-Welch algorithm, Model topology, Numerical stability Chapter
. Hidden Markov Model Lecture #6 Background Readings: Chapters 3.1, 3.2 in the text book, Biological Sequence Analysis, Durbin et al., 2001.
CpG islands in DNA sequences
Hidden Markov Models Lecture 5, Tuesday April 15, 2003.
. Computational Genomics Lecture 8a Hidden Markov Models (HMMs) © Ydo Wexler & Dan Geiger (Technion) and by Nir Friedman (HU) Modified by Benny Chor (TAU)
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 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.
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.
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. Sequence Models u So far we examined several probabilistic model sequence models u These model, however, assumed that.
Hidden Markov Model Continues …. Finite State Markov Chain A discrete time stochastic process, consisting of a domain D of m states {1,…,m} and 1.An m.
Dishonest Casino Let’s take a look at a casino that uses a fair die most of the time, but occasionally changes it to a loaded die. This model is hidden.
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.
. Parameter Estimation For HMM Lecture #7 Background Readings: Chapter 3.3 in the text book, Biological Sequence Analysis, Durbin et al., 2001.
BINF6201/8201 Hidden Markov Models for Sequence Analysis
Fundamentals of Hidden Markov Model Mehmet Yunus Dönmez.
Hidden Markov Models Yves Moreau Katholieke Universiteit Leuven.
Hidden Markov Models Usman Roshan CS 675 Machine Learning.
Hidden Markov Models BMI/CS 776 Mark Craven March 2002.
10/29/20151 Gene Finding Project (Cont.) Charles Yan.
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.
Algorithms in Computational Biology11Department of Mathematics & Computer Science Algorithms in Computational Biology Markov Chains and Hidden Markov Model.
CZ5226: Advanced Bioinformatics Lecture 6: HHM Method for generating motifs Prof. Chen Yu Zong Tel:
1 DNA Analysis Part II Amir Golnabi ENGS 112 Spring 2008.
Hidden Markov Model Parameter Estimation BMI/CS 576 Colin Dewey Fall 2015.
Visual Recognition Tutorial1 Markov models Hidden Markov models Forward/Backward algorithm Viterbi algorithm Baum-Welch estimation algorithm Hidden.
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
Three classic HMM problems
CISC 667 Intro to Bioinformatics (Fall 2005) Hidden Markov Models (I)
Hidden Markov Model ..
Algorithms of POS Tagging
CSE 5290: Algorithms for Bioinformatics Fall 2009
Hidden Markov Model Lecture #6
CISC 667 Intro to Bioinformatics (Fall 2005) Hidden Markov Models (I)
Presentation transcript:

Marjolijn Elsinga & Elze de Groot1 Markov Chains and Hidden Markov Models Marjolijn Elsinga & Elze de Groot

Marjolijn Elsinga & Elze de Groot2 Andrei A. Markov Born: 14 June 1856 in Ryazan, Russia Died: 20 July 1922 in Petrograd, Russia Graduate of Saint Petersburg University (1878) Work: number theory and analysis, continued fractions, limits of integrals, approximation theory and the convergence of series

Marjolijn Elsinga & Elze de Groot3 Todays topics Markov chains Hidden Markov models - Viterbi Algorithm - Forward Algorithm - Backward Algorithm - Posterior Probabilities

Marjolijn Elsinga & Elze de Groot4 Markov Chains (1) Emitting states

Marjolijn Elsinga & Elze de Groot5 Markov Chains (2) Transition probabilities Probability of the sequence

Marjolijn Elsinga & Elze de Groot6 Key property of Markov Chains The probability of a symbol x i depends only on the value of the preceding symbol x i-1

Marjolijn Elsinga & Elze de Groot7 Begin and End states Silent states

Marjolijn Elsinga & Elze de Groot8 Example: CpG Islands CpG = Cytosine – phosphodiester bond – Guanine 100 – 1000 bases long Cytosine is modified by methylation Methylation is suppressed in short stretches of the genome (start regions of genes) High chance of mutation into a thymine (T)

Marjolijn Elsinga & Elze de Groot9 Two questions How would we decide if a short strech of genomic sequence comes from a CpG island or not? How would we find, given a long piece of sequence, the CpG islands in it, if there are any?

Marjolijn Elsinga & Elze de Groot10 Discrimination 48 putative CpG islands are extracted Derive 2 models - regions labelled as CpG island (‘+’ model) - regions from the remainder (‘-’ model) Transition probabilities are set - Where C st + is number of times letter t follows letter s

Marjolijn Elsinga & Elze de Groot11 Maximum Likelihood Estimators Each row sums to 1 Tables are asymmetric

Marjolijn Elsinga & Elze de Groot12 Log-odds ratio

Marjolijn Elsinga & Elze de Groot13 Discrimination shown

Marjolijn Elsinga & Elze de Groot14 Simulation: ‘+’ model

Marjolijn Elsinga & Elze de Groot15 Simulation: ‘-’ model

Marjolijn Elsinga & Elze de Groot16 Todays topics Markov chains Hidden Markov models - Viterbi Algorithm - Forward Algorithm - Backward Algorithm - Posterior Probabilities

Marjolijn Elsinga & Elze de Groot17 Hidden Markov Models (HMM) (1) No one-to-one correspondence between states and symbols No longer possible to say what state the model is in when in xi Transition probability from state k to l: πi is the ith state in the path (state sequence)

Marjolijn Elsinga & Elze de Groot18 Hidden Markov Models (HMM) (2) Begin state: a 0k End state: a 0k In CpG islands example:

Marjolijn Elsinga & Elze de Groot19 Hidden Markov Models (HMM) (3) We need new set of parameters because we decoupled symbols from states Probability that symbol b is seen when in state k:

Marjolijn Elsinga & Elze de Groot20 Example: dishonest casino (1) Fair die and loaded die Loaded die: probability 0.5 of a 6 and probability 0.1 for 1-5 Switch from fair to loaded: probability 0.05 Switch back: probability 0.1

Marjolijn Elsinga & Elze de Groot21 Dishonest casino (2) Emission probabilities: HMM model that generate or emit sequences

Marjolijn Elsinga & Elze de Groot22 Dishonest casino (3) Hidden: you don’t know if die is fair or loaded Joint probability of observed sequence x and state sequence π:

Marjolijn Elsinga & Elze de Groot23 Three algorithms What is the most probable path for generating a given sequence? Viterbi Algorithm How likely is a given sequence? Forward Algorithm How can we learn the HMM parameters given a set of sequences? Forward-Backward (Baum-Welch) Algorithm

Marjolijn Elsinga & Elze de Groot24 Viterbi Algorithm CGCG can be generated on different ways, and with different probabilities Choose path with highest probability Most probable path can be found recursively

Marjolijn Elsinga & Elze de Groot25 Viterbi Algorithm (2) v k (i) = probability of most probable path ending in state k with observation i

Marjolijn Elsinga & Elze de Groot26 Viterbi Algorithm (3)

Marjolijn Elsinga & Elze de Groot27 Viterbi Algorithm Most probable path for CGCG

Marjolijn Elsinga & Elze de Groot28 Viterbi Algorithm Result with casino example

Marjolijn Elsinga & Elze de Groot29 Three algorithms What is the most probable path for generating a given sequence? Viterbi Algorithm How likely is a given sequence? Forward Algorithm How can we learn the HMM parameters given a set of sequences? Forward-Backward (Baum-Welch) Algorithm

Marjolijn Elsinga & Elze de Groot30 Forward Algorithm (1) Probability over all possible paths Number of possible paths increases exponentonial with length of sequence Forward algorithm enables us to compute this efficiently

Marjolijn Elsinga & Elze de Groot31 Forward Algorithm (2) Replacing maximisation steps for sums in viterbi algorithm Probability of observed sequence up to and including x i, requiring π i = k

Marjolijn Elsinga & Elze de Groot32 Forward Algorithm (3)

Marjolijn Elsinga & Elze de Groot33 Three algorithms What is the most probable path for generating a given sequence? Viterbi Algorithm How likely is a given sequence? Forward Algorithm How can we learn the HMM parameters given a set of sequences? Forward-Backward (Baum-Welch) Algorithm

Marjolijn Elsinga & Elze de Groot34 Backward Algorithm (1) Probability of observed sequence from xi to the end of the sequence, requiring πi = k

Marjolijn Elsinga & Elze de Groot35 Disadvantage Algorithms Multiplying many probabilities gives very small numbers which can lead to underflow errors on the computer  can be solved by doing the algorithms in log space, calculating log(v l (i))

Marjolijn Elsinga & Elze de Groot36 Backward Algorithm

Marjolijn Elsinga & Elze de Groot37 Posterior State Probability (1) Probability that observation x i came from state k, given the observed sequence Posterior probability of state k at time i when the emitted sequence is known: P(π i = k | x)

Marjolijn Elsinga & Elze de Groot38 Posterior State Probability (2) First calculate probability of producing entire observed sequence with the ith symbol being produced by state k P(x, π i = k) = f k (i) · b k (i)

Marjolijn Elsinga & Elze de Groot39 Posterior State Probability (3) Posterior probabilities will then be: P(x) is result of forward or backward calculation

Marjolijn Elsinga & Elze de Groot40 Posterior Probabilities (4) For the casino example

Marjolijn Elsinga & Elze de Groot41 Two questions How would we decide if a short strech of genomic sequence comes from a CpG island or not? How would we find, given a long piece of sequence, the CpG islands in it, if there are any?

Marjolijn Elsinga & Elze de Groot42 Prediction of CpG islands First way: Viterbi Algorithm -Find most probable path through the model -When this path goes through the ‘+’ state, a CpG island is predicted

Marjolijn Elsinga & Elze de Groot43 Prediction of CpG islands Second Way: Posterior Decoding - function: -g(k) = 1 for k Є {A +, C +, G +, T + } -g(k) = 0 for k Є {A -, C -, G -, T - } -G(i|x) is posterior probability according to the model that base i is in a CpG island

Marjolijn Elsinga & Elze de Groot44 Summary (1) Markov chain is a collection of states where a state depends only on the state before Hidden markov model is a model in which the states sequence is ‘hidden’

Marjolijn Elsinga & Elze de Groot45 Summary (2) Most probable path: viterbi algorithm How likely is a given sequence?: forward algorithm Posterior state probability: forward and backward algorithms (used for most probable state of an observation)