Hidden Markov Models

Total Page:16

File Type:pdf, Size:1020Kb

Hidden Markov Models Hidden Markov Models A profile HMM What is a HMM? • It’s a model. It condenses information. • Models 1D discrete data. • Directed graph. • Nodes emit discrete data • Edges transition between nodes. • What’s hidden about it? • Node identity. • Who is Markov? 2 Markov processes time sequence Markov process is any process where the next item in the list depends on the current item. The dimension can be time, sequence position, etc Modeling protein secondary structure using Markov chains “states” connected by “transitions” H E H=helix E=extended (strand) L L=loop Setting the parameters of a Markov model from data. Secondary structure data LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLEEEEELLLLEEEEELLLLLLLLLLLEEEEEEEEELLLLLEEEEEEEEELL LLLLLLEEEEEELLLLLEEEEEELLLLLLLLLLLLLLLEEEEEELLLLLEEEEELLLLLLLLLLEEEELLLLEEEELLLLEEE EEEEELLLLLLEEEEEEEEELLLLLLEELLLLLLLLLLLLLLLLLLLLLLLLEEEEELLLEEEEEELLLLLLLLLLEEEEEEL LLLLEEELLLLLLLLLLLLLEEEEEEEEELLLEEEEEELLLLLLLLLLLLLLLLLLLHHHHHHHHHHHHHLLLLLLLEEL HHHHHHHHHHLLLLLLHHHHHHHHHHHLLLLLLLELHHHHHHHHHHHHLLLLLHHHHHHHHHHHHHLLLLLEEEL HHHHHHHHHHLLLLLLHHHHHHHHHHEELLLLLLHHHHHHHHHHHLLLLLLLHHHHHHHHHHHHHHHHHHHHH HHHHHHLLLLLLHHHHHHHHHHHHHHHHHHLLLHHHHHHHHHHHHHHLLLLEEEELLLLLLLLLLLLLLLLEEEEL LLLHHHHHHHHHHHHHHHLLLLLLLLEELLLLLHHHHHHHHHHHHHHLLLLLLEEEEELLLLLLLLLLHHHHHHHH HHHHHHHHHHHHHHHLLLLLHHHHHHHHHLLLLHHHHHHHLLHHHHHHHHHHHHHHHHHHHH Count the pairs to get the transition probability. E P(L|E) L P(L|E) = P(EL)/P(E) = counts(EL)/counts(E) counts(E) = counts(EE) + counts(EL) + counts(EH) Therefore: P(E|E) + P(L|E) + P(H|E) = 1. A transition matrix P(H|H) P(E|H) P(E|E) P(qt|qt-1) H E H E L P(H|E) P(L|E) H .93 .01 .06 P(L|H) P(H|L) P(E|L) E .01 .80 .19 L L .04 .06 .90 P(L|L) **This is a “first-order” MM. Transition probabilities depend on only the current state. P(S|λ), the probability of a sequence, given the model. P(“HHEELL”| λ) =P(H)P(H|H)P(E|H)P(E|E)P(L|E)P(L|L) λ H E L =(.33)(.93)(.01)(.80)(.19)(.90) H .93 .01 .06 =4.2E-4 E .01 .80 .19 P(“HHHHHH” | ) =0.69 common protein secondary structure L .04 .06 .90 λ P(“HEHEHE” | λ) =1E-6 not protein secondary structure Probability discriminates between realistic and unrealistic sequences What is the maximum likelihood model given a dataset of sequences? Dataset. HHEELL H E L H E L HHEELL H 1 1 0 H 0.5 0.5 0 HHEELL HHEELL E 0 1 1 E 0 0.5 0.5 HHEELL L 0 0 1 L .0 0 1.0 HHEELL Maximum likelihood model Count the state pairs. Normalize by row. Is this model too simple? H E L Synthetic helix length data from this model Frequency 1 2 3 4 5 6 7 8 9 10 Real helix length data *L.Pal et al, J. Mol. Biol. (2003) 326, 273–291 “A model should be as simple as possible but not simpler” --Einstein A pseudo-higher-order HMM A Markov chain for proteins where helices are always exactly 4 residues long H H H H L E A Markov chain for proteins where helices are always at least 4 residues long H H H H L E Can you draw a Markov chain where helices are always a multiple of 4 long? H H H H L E H1 H2 H3 H4 E L Calculate probability of H1 1 H2 1 EHHHHHLLE. H3 1 H4 0.5 0.1 0.4 E 0.2 0.7 0.1 L 0.2 0.2 0.6 Example application: A Markov chain for CpG islands A T a “saturated” 4-state MM C G P(ATCGCGTA...) = πAaATaTCaCGaGCaCGaGTaTA … 1 CpG Islands + - DNA ... - + ... methylated Not methylated DNA is methylated on C to protect against endonucleases. Using mass spectroscopy we can find regions of DNA that are methylated and regions that are not. Regions that are protected from methylation may be functionally important, i.e. transcription factor binding sites. NNNCGNNN NNNTGNNN During the course of evolution. Methylated CpG’s get mutated to TpG’s Using Markov chains for descrimination: CpG Islands in human chromosome sequences ... + - + - ... CpG rich CpG poor CpG rich= "+" CpG poor= "-" + A C G T - A C G T A 0.180 0.274 0.426 0.120 A 0.300 0.205 0.285 0.210 C 0.171 0.368 0.274 0.188 C 0.322 0.298 0.078 0.302 G 0.161 0.339 0.385 0.125 G 0.248 0.246 0.298 0.208 T 0.079 0.355 0.384 0.182 T 0.177 0.239 0.292 0.292 P(CGCG|+) = πC(0.274)(0.339)(0.274) = πC 0.0255 P(CGCG|-) = πC(0.078)(0.246)(0.078) = πC 0.0015 2 From Durbin,Eddy, Krogh and Mitcheson “Biological Sequence Analysis” (1998) p.50 Rabiner’s notation P(y, x) F(y, x) a = P(x | y) = = yx P(y) F(y) ...the conditional probability of x given y, or the transition probability of state y to state x. πx = P(x) = F(x)/N ...the unconditional probability of being in state x . (used to start a state pathway) bx (y) = P(y|x) ...the conditional probability of emitting character y given state x. Comparing two MMs The log likelihood ratio (LLR) L + L + L ax x a x x log i−1 i = log i−1 i = β ∏ − ∑ − ∑ x i−1x i i =1 ax i−1x i i =1 a xi−1 xi i =1 β A C G T Log-likelihood ratios A -0.740 0.419 0.580 -0.803 for transitions: C -0.913 0.302 1.812 -0.685 G -0.624 0.461 0.331 -0.730 T -1.169 0.573 0.393 -0.679 Sum the LLRs. If the result is positive, its a CpG island, otherwise not. 3 LLR(CGCG)=1.812 + 0.461 + 1.812 = 4.085 yes Combining two Markov chains to make a hidden Markov model A hidden Markov model can have multiple paths for a sequence C A T "+" model G Transitions between +/- models "–"model A T G In Hidden Markov models (HMM), there is no one-to-one correspondence between the state and the emitted symbol. 4 Probability of a sequence using a HMM Different state sequences can produce the same emitted sequence Nucleotide sequence (S): C G C G State sequences (Q): P(sequence,path) C+ G+ C+ G+ πC+ aC+G+aG+C+aC+G+ C- G- C- G- πC- aC-G- aG-C- aC-G- C+ G+ C- G- πC+ aC+G+aG+C-aC-G- C+ G- C- G+ πC+ aC+G- aG-C- aC-G+ etc.... etc.... P(CGCG|λ) = Σ P(Q) All paths Q Each state sequence has a probability. The sum of all state sequences that emit CGCG is the P(CGCG). 5 Three HMM Algorithms 1. The Viterbi algorithm: get the optimal state pathway. Maximum joint prob. 2. The Forward/Backward algorithm: get the probability of each state at each position. Sum over all joint probs. 3. Expectation/Maximization: refine the parameters of the model using the data Back to secondary structure prediction.... Parallel HMM: emits sec struct and amino acid bH(i) H E The marble bag represents Each state emits one a probability distribution of amino acids, b. ( a L amino acid from the profile ) marblebag, for each visit. probability distribution == a set of stacked odds? probabilities (0 ≤ p ≤ 1) that sum to 1. 0. 1. states emit aa and ss. Amino acid Sequence H E L λ State sequence (secondary Given an amino acid sequence, what is the structure) most probable state sequence? HMM data structure for parallel HMM in fortran... type HMMNODE integer :: id type (HMMEDGE), pointer :: a(:) real :: b(20), emit(:) logical :: emitting end type HMMNODE type HMMEDGE integer :: id real :: p type (HMMNODE), pointer :: q end type HMMEDGE type (HMMSTATE), pointer :: hmm_root A linked list... hmm_root should be the “begin” state, with hmm_root%emitting set to .false. If (emitting==.true.) then the state emits amino acid profile b, and optionally something else called emit(:). 23 In class exercise: what’s the LLR? What is the LLR that this seq is a CpG Island? ATGTCTTAGCGCGATCAGCGAAAGCCACG β A C G T A -0.740 0.419 0.580 -0.803 C -0.913 0.302 1.812 -0.685 G -0.624 0.461 0.331 -0.730 T -1.169 0.573 0.393 -0.679 L LLR = β = _______________ ∑ xi−1xi i=1 3 HMM: assigning the states given the sequence is not as easy. Typically, when using a HMM, the task is to determine the optimal state pathway given the sequence. The state pathway provides some predictive feature, such as secondary structure, or splice site/not splice site, or CpG island/not CpG island, etc. In Principle, we can do this task by trying all state pathways Q, and choosing the optimal. In Practice, this is usually impossible, because the number of pathways increases as the number of states to the power of the length, i.e. O(nm). How do we do it, then? Maximize: Joint probability of a sequence and pathway Q = {q1,q2,q3,…qT} = sequence of Markov states, or pathway S = {s1,s2,s3,…sT} = sequence of amino acids or nucleotides T = length of S and Q. Joint probability of a pathway and sequence, given a HMM λ. S= A G P L V D H H H H H H Q= E E E E E E L L L L L L P= πHbH(A) × aHHbH(G) × aHEbE(P) × aEEbE(L) × aEEbE(V) × aELbL(D) Joint probability : general expression General expression for pathway Q through HMM λ : P(S,Q | λ) = π b s a q1 ∏ qt ( t ) qtqt+1 t =1,T ** **when t=T, there is no qt+1. Use a = 1 A G P L V D H H H H H H E E E E E E L L L L L L The Viterbi algorithm:the maximum probability path For all states k Recursive.
Recommended publications
  • Multivariate Poisson Hidden Markov Models for Analysis of Spatial Counts
    View metadata, citation and similar papers at core.ac.uk brought to you by CORE provided by University of Saskatchewan's Research Archive MULTIVARIATE POISSON HIDDEN MARKOV MODELS FOR ANALYSIS OF SPATIAL COUNTS A Thesis Submitted to the Faculty of Graduate Studies and Research in Partial Fulfillment of the Requirements for the Degree of Doctor of Philosophy in the Department of Mathematics and Statistics University of Saskatchewan, Saskatoon, SK, Canada by Chandima Piyadharshani Karunanayake @Copyright Chandima Piyadharshani Karunanayake, June 2007. All rights Reserved. PERMISSION TO USE The author has agreed that the libraries of this University may provide the thesis freely available for inspection. Moreover, the author has agreed that permission for copying of the thesis in any manner, entirely or in part, for scholarly purposes may be granted by the Professor or Professors who supervised my thesis work or in their absence, by the Head of the Department of Mathematics and Statistics or the Dean of the College in which the thesis work was done. It is understood that any copying or publication or use of the thesis or parts thereof for finanancial gain shall not be allowed without my written permission. It is also understood that due recognition shall be given to the author and to the University of Saskatchewan in any scholarly use which may be made of any material in this thesis. Requests for permission to copy or to make other use of any material in the thesis should be addressed to: Head Department of Mathematics and Statistics University of Saskatchewan 106, Wiggins Road Saskatoon, Saskatchewan Canada, S7N 5E6 i ABSTRACT Multivariate count data are found in a variety of fields.
    [Show full text]
  • Regime Heteroskedasticity in Bitcoin: a Comparison of Markov Switching Models
    Munich Personal RePEc Archive Regime heteroskedasticity in Bitcoin: A comparison of Markov switching models Chappell, Daniel Birkbeck College, University of London 28 September 2018 Online at https://mpra.ub.uni-muenchen.de/90682/ MPRA Paper No. 90682, posted 24 Dec 2018 06:38 UTC Regime heteroskedasticity in Bitcoin: A comparison of Markov switching models Daniel R. Chappell Department of Economics, Mathematics and Statistics Birkbeck College, University of London [email protected] 28th September 2018 Abstract Markov regime-switching (MRS) models, also known as hidden Markov models (HMM), are used extensively to account for regime heteroskedasticity within the returns of financial assets. However, we believe this paper to be one of the first to apply such methodology to the time series of cryptocurrencies. In light of Moln´arand Thies (2018) demonstrating that the price data of Bitcoin contained seven distinct volatility regimes, we will fit a sample of Bitcoin returns with six m-state MRS estimations, with m ∈ {2,..., 7}. Our aim is to identify the optimal number of states for modelling the regime heteroskedasticity in the price data of Bitcoin. Goodness-of-fit will be judged using three information criteria, namely: Bayesian (BIC); Hannan-Quinn (HQ); and Akaike (AIC). We determined that the restricted 5-state model generated the optimal estima- tion for the sample. In addition, we found evidence of volatility clustering, volatility jumps and asymmetric volatility transitions whilst also inferring the persistence of shocks in the price data of Bitcoin. Keywords Bitcoin; Markov regime-switching; regime heteroskedasticity; volatility transitions. 1 2 List of Tables Table 1. Summary statistics for Bitcoin (23rd April 2014 to 31st May 2018) .
    [Show full text]
  • 12 : Conditional Random Fields 1 Hidden Markov Model
    10-708: Probabilistic Graphical Models 10-708, Spring 2014 12 : Conditional Random Fields Lecturer: Eric P. Xing Scribes: Qin Gao, Siheng Chen 1 Hidden Markov Model 1.1 General parametric form In hidden Markov model (HMM), we have three sets of parameters, j i transition probability matrix A : p(yt = 1jyt−1 = 1) = ai;j; initialprobabilities : p(y1) ∼ Multinomial(π1; π2; :::; πM ); i emission probabilities : p(xtjyt) ∼ Multinomial(bi;1; bi;2; :::; bi;K ): 1.2 Inference k k The inference can be done with forward algorithm which computes αt ≡ µt−1!t(k) = P (x1; :::; xt−1; xt; yt = 1) recursively by k k X i αt = p(xtjyt = 1) αt−1ai;k; (1) i k k and the backward algorithm which computes βt ≡ µt t+1(k) = P (xt+1; :::; xT jyt = 1) recursively by k X i i βt = ak;ip(xt+1jyt+1 = 1)βt+1: (2) i Another key quantity is the conditional probability of any hidden state given the entire sequence, which can be computed by the dot product of forward message and backward message by, i i i i X i;j γt = p(yt = 1jx1:T ) / αtβt = ξt ; (3) j where we define, i;j i j ξt = p(yt = 1; yt−1 = 1; x1:T ); i j / µt−1!t(yt = 1)µt t+1(yt+1 = 1)p(xt+1jyt+1)p(yt+1jyt); i j i = αtβt+1ai;jp(xt+1jyt+1 = 1): The implementation in Matlab can be vectorized by using, i Bt(i) = p(xtjyt = 1); j i A(i; j) = p(yt+1 = 1jyt = 1): 1 2 12 : Conditional Random Fields The relation of those quantities can be simply written in pseudocode as, T αt = (A αt−1): ∗ Bt; βt = A(βt+1: ∗ Bt+1); T ξt = (αt(βt+1: ∗ Bt+1) ): ∗ A; γt = αt: ∗ βt: 1.3 Learning 1.3.1 Supervised Learning The supervised learning is trivial if only we know the true state path.
    [Show full text]
  • Estimation of Viterbi Path in Bayesian Hidden Markov Models
    Estimation of Viterbi path in Bayesian hidden Markov models Jüri Lember1,∗ Dario Gasbarra2, Alexey Koloydenko3 and Kristi Kuljus1 May 14, 2019 1University of Tartu, Estonia; 2University of Helsinki, Finland; 3Royal Holloway, University of London, UK Abstract The article studies different methods for estimating the Viterbi path in the Bayesian framework. The Viterbi path is an estimate of the underlying state path in hidden Markov models (HMMs), which has a maximum joint posterior probability. Hence it is also called the maximum a posteriori (MAP) path. For an HMM with given parameters, the Viterbi path can be easily found with the Viterbi algorithm. In the Bayesian framework the Viterbi algorithm is not applicable and several iterative methods can be used instead. We introduce a new EM-type algorithm for finding the MAP path and compare it with various other methods for finding the MAP path, including the variational Bayes approach and MCMC methods. Examples with simulated data are used to compare the performance of the methods. The main focus is on non-stochastic iterative methods and our results show that the best of those methods work as well or better than the best MCMC methods. Our results demonstrate that when the primary goal is segmentation, then it is more reasonable to perform segmentation directly by considering the transition and emission parameters as nuisance parameters. Keywords: HMM, Bayes inference, MAP path, Viterbi algorithm, segmentation, EM, variational Bayes, simulated annealing 1 Introduction and preliminaries arXiv:1802.01630v2 [stat.CO] 11 May 2019 Hidden Markov models (HMMs) are widely used in application areas including speech recognition, com- putational linguistics, computational molecular biology, and many more.
    [Show full text]
  • Ergodicity, Decisions, and Partial Information
    Ergodicity, Decisions, and Partial Information Ramon van Handel Abstract In the simplest sequential decision problem for an ergodic stochastic pro- cess X, at each time n a decision un is made as a function of past observations X0,...,Xn 1, and a loss l(un,Xn) is incurred. In this setting, it is known that one may choose− (under a mild integrability assumption) a decision strategy whose path- wise time-average loss is asymptotically smaller than that of any other strategy. The corresponding problem in the case of partial information proves to be much more delicate, however: if the process X is not observable, but decisions must be based on the observation of a different process Y, the existence of pathwise optimal strategies is not guaranteed. The aim of this paper is to exhibit connections between pathwise optimal strategies and notions from ergodic theory. The sequential decision problem is developed in the general setting of an ergodic dynamical system (Ω,B,P,T) with partial information Y B. The existence of pathwise optimal strategies grounded in ⊆ two basic properties: the conditional ergodic theory of the dynamical system, and the complexity of the loss function. When the loss function is not too complex, a gen- eral sufficient condition for the existence of pathwise optimal strategies is that the dynamical system is a conditional K-automorphism relative to the past observations n n 0 T Y. If the conditional ergodicity assumption is strengthened, the complexity assumption≥ can be weakened. Several examples demonstrate the interplay between complexity and ergodicity, which does not arise in the case of full information.
    [Show full text]
  • Particle Gibbs for Infinite Hidden Markov Models
    Particle Gibbs for Infinite Hidden Markov Models Nilesh Tripuraneni* Shixiang Gu* Hong Ge University of Cambridge University of Cambridge University of Cambridge [email protected] MPI for Intelligent Systems [email protected] [email protected] Zoubin Ghahramani University of Cambridge [email protected] Abstract Infinite Hidden Markov Models (iHMM’s) are an attractive, nonparametric gener- alization of the classical Hidden Markov Model which can automatically infer the number of hidden states in the system. However, due to the infinite-dimensional nature of the transition dynamics, performing inference in the iHMM is difficult. In this paper, we present an infinite-state Particle Gibbs (PG) algorithm to re- sample state trajectories for the iHMM. The proposed algorithm uses an efficient proposal optimized for iHMMs and leverages ancestor sampling to improve the mixing of the standard PG algorithm. Our algorithm demonstrates significant con- vergence improvements on synthetic and real world data sets. 1 Introduction Hidden Markov Models (HMM’s) are among the most widely adopted latent-variable models used to model time-series datasets in the statistics and machine learning communities. They have also been successfully applied in a variety of domains including genomics, language, and finance where sequential data naturally arises [Rabiner, 1989; Bishop, 2006]. One possible disadvantage of the finite-state space HMM framework is that one must a-priori spec- ify the number of latent states K. Standard model selection techniques can be applied to the fi- nite state-space HMM but bear a high computational overhead since they require the repetitive trainingexploration of many HMM’s of different sizes.
    [Show full text]
  • Hidden Markov Models (Particle Filtering)
    CSE 473: Artificial Intelligence Spring 2014 Hidden Markov Models & Particle Filtering Hanna Hajishirzi Many slides adapted from Dan Weld, Pieter Abbeel, Dan Klein, Stuart Russell, Andrew Moore & Luke Zettlemoyer 1 Outline § Probabilistic sequence models (and inference) § Probability and Uncertainty – Preview § Markov Chains § Hidden Markov Models § Exact Inference § Particle Filters § Applications Example § A robot move in a discrete grid § May fail to move in the desired direction with some probability § Observation from noisy sensor at each time § Is a function of robot position § Goal: Find the robot position (probability that a robot is at a specific position) § Cannot always compute this probability exactly è Approximation methods Here: Approximate a distribution by sampling 3 Hidden Markov Model § State Space Model § Hidden states: Modeled as a Markov Process P(x0), P(xk | xk-1) § Observations: ek P(ek | xk) Position of the robot P(x1|x0) x x x 0 1 … n Observed position from P(e |x ) 0 0 the sensor y0 y1 yn 4 Exact Solution: Forward Algorithm § Filtering is the inference process of finding a distribution over XT given e1 through eT : P( XT | e1:t ) § We first compute P( X1 | e1 ): § For each t from 2 to T, we have P( Xt-1 | e1:t-1 ) § Elapse time: compute P( Xt | e1:t-1 ) § Observe: compute P(Xt | e1:t-1 , et) = P( Xt | e1:t ) Approximate Inference: § Sometimes |X| is too big for exact inference § |X| may be too big to even store B(X) § E.g. when X is continuous § |X|2 may be too big to do updates § Solution: approximate inference by sampling § How robot localization works in practice 6 What is Sampling? § Goal: Approximate the original distribution: § Approximate with Gaussian distribution § Draw samples from a distribution close enough to the original distribution § Here: A general framework for a sampling method 7 Approximate Solution: Perfect Sampling Robot path till time n 1 Time 1 Time n Assume we can sample Particle 1 x0:n from the original distribution .
    [Show full text]
  • Hierarchical Dirichlet Process Hidden Markov Model for Unsupervised Bioacoustic Analysis
    Hierarchical Dirichlet Process Hidden Markov Model for Unsupervised Bioacoustic Analysis Marius Bartcus, Faicel Chamroukhi, Herve Glotin Abstract-Hidden Markov Models (HMMs) are one of the the standard HDP-HMM Gibbs sampling has the limitation most popular and successful models in statistics and machine of an inadequate modeling of the temporal persistence of learning for modeling sequential data. However, one main issue states [9]. This problem has been addressed in [9] by relying in HMMs is the one of choosing the number of hidden states. on a sticky extension which allows a more robust learning. The Hierarchical Dirichlet Process (HDP)-HMM is a Bayesian Other solutions for the inference of the hidden Markov non-parametric alternative for standard HMMs that offers a model in this infinite state space models are using the Beam principled way to tackle this challenging problem by relying sampling [lO] rather than Gibbs sampling. on a Hierarchical Dirichlet Process (HDP) prior. We investigate the HDP-HMM in a challenging problem of unsupervised We investigate the BNP formulation for the HMM, that is learning from bioacoustic data by using Markov-Chain Monte the HDP-HMM into a challenging problem of unsupervised Carlo (MCMC) sampling techniques, namely the Gibbs sampler. learning from bioacoustic data. The problem consists of We consider a real problem of fully unsupervised humpback extracting and classifying, in a fully unsupervised way, whale song decomposition. It consists in simultaneously finding the structure of hidden whale song units, and automatically unknown number of whale song units. We use the Gibbs inferring the unknown number of the hidden units from the Mel sampler to infer the HDP-HMM from the bioacoustic data.
    [Show full text]
  • Modelling Multi-Object Activity by Gaussian Processes 1
    LOY et al.: MODELLING MULTI-OBJECT ACTIVITY BY GAUSSIAN PROCESSES 1 Modelling Multi-object Activity by Gaussian Processes Chen Change Loy School of EECS [email protected] Queen Mary University of London Tao Xiang E1 4NS London, UK [email protected] Shaogang Gong [email protected] Abstract We present a new approach for activity modelling and anomaly detection based on non-parametric Gaussian Process (GP) models. Specifically, GP regression models are formulated to learn non-linear relationships between multi-object activity patterns ob- served from semantically decomposed regions in complex scenes. Predictive distribu- tions are inferred from the regression models to compare with the actual observations for real-time anomaly detection. The use of a flexible, non-parametric model alleviates the difficult problem of selecting appropriate model complexity encountered in parametric models such as Dynamic Bayesian Networks (DBNs). Crucially, our GP models need fewer parameters; they are thus less likely to overfit given sparse data. In addition, our approach is robust to the inevitable noise in activity representation as noise is modelled explicitly in the GP models. Experimental results on a public traffic scene show that our models outperform DBNs in terms of anomaly sensitivity, noise robustness, and flexibil- ity in modelling complex activity. 1 Introduction Activity modelling and automatic anomaly detection in video have received increasing at- tention due to the recent large-scale deployments of surveillance cameras. These tasks are non-trivial because complex activity patterns in a busy public space involve multiple objects interacting with each other over space and time, whilst anomalies are often rare, ambigu- ous and can be easily confused with noise caused by low image quality, unstable lighting condition and occlusion.
    [Show full text]
  • Sequence Models
    Sequence Models Noah Smith Computer Science & Engineering University of Washington [email protected] Lecture Outline 1. Markov models 2. Hidden Markov models 3. Viterbi algorithm 4. Other inference algorithms for HMMs 5. Learning algorithms for HMMs Shameless Self-Promotion • Linguistic Structure Prediction (2011) • Links material in this lecture to many related ideas, including some in other LxMLS lectures. • Available in electronic and print form. MARKOV MODELS One View of Text • Sequence of symbols (bytes, letters, characters, morphemes, words, …) – Let Σ denote the set of symbols. • Lots of possible sequences. (Σ* is infinitely large.) • Probability distributions over Σ*? Pop QuiZ • Am I wearing a generative or discriminative hat right now? Pop QuiZ • Generative models tell a • Discriminative models mythical story to focus on tasks (like explain the data. sorting examples). Trivial Distributions over Σ* • Give probability 0 to sequences with length greater than B; uniform over the rest. • Use data: with N examples, give probability N-1 to each observed sequence, 0 to the rest. • What if we want every sequence to get some probability? – Need a probabilistic model family and algorithms for constructing the model from data. A History-Based Model n+1 p(start,w1,w2,...,wn, stop) = γ(wi w1,w2,...,wi 1) | − i=1 • Generate each word from left to right, conditioned on what came before it. Die / Dice one die two dice start one die per history: … … … start I one die per history: … … … history = start start I want one die per history: … … history = start I … start I want a one die per history: … … … history = start I want start I want a flight one die per history: … … … history = start I want a start I want a flight to one die per history: … … … history = start I want a flight start I want a flight to Lisbon one die per history: … … … history = start I want a flight to start I want a flight to Lisbon .
    [Show full text]
  • Markov-Modulated Marked Poisson Processes for Check-In Data [Draft]
    Markov-modulated marked Poisson processes for check-in data [draft] Jiangwei Pan [email protected] Duke University Vinayak Rao [email protected] Purdue University Pankaj K. Agarwal [email protected] Duke University Alan E. Gelfand [email protected] Duke University Abstract Figure 1. Visualizing We develop continuous-time probabilistic mod- the check-in loca- els to study trajectory data consisting of times tions (in the US) and locations of user ‘check-ins’. We model of 500 random these as realizations of a marked point pro- users from the cess, with intensity and mark-distribution mod- FourSquare dataset ulated by a latent Markov jump process (MJP). (Gao et al., 2012). We extend this Markov-modulated marked Pois- son process to include user-heterogeneity by as- be noisy, due to measurement error or human perturbation. signing users vectors of ‘preferred locations’. In many cases, the trajectory sample points are sparse, with Our model extends latent Dirichlet allocation by large gaps between bursts of observations. Furthermore, dropping the bag-of-words assumption, and op- the rate of observations can vary along the trajectory, and erating in continuous time. We show how an ap- can depend on the the user and the location of the trajectory propriate choice of priors allows efficient poste- rior inference. Our experiments demonstrate the Our focus in this paper is on user check-in data; in partic- usefulness of our approach by comparing with ular, we consider a dataset of FourSquare check-ins (Gao various baselines on a variety of tasks. et al., 2012) (see Figure1). This smartphone-based social media tool allows individuals to publicly register visits to interesting places: a check-in is a record of such a visit, 1.
    [Show full text]
  • Forecasting Volatility of Stock Indices with HMM-SV Models
    Forecasting Volatility of Stock Indices with HMM-SV Models I· , •• Nkemnole E. B. ,Abass 0.- *Department of Mathematics, University of Lagos, Nigeria. enkemnole(cv,uni lag.edu.ng I, **Department of Computer Sciences, University of Lagos, Nigeria. ,'--., '1 d ~ o Ia baSS(Q!Unl ag.e u.ng- Abstract The use of volatility models to generate volatility forecasts has given vent to a lot of literature. However, it is known that volatility persistence, as indicated by the estimated parameter rp , in Stochastic Volatility (SV) model is typically high. Since future values in SV models are based on the estimation of the parameters, this may lead to poor volatility forecasts. Furthermore. this high persistence, as contended by some writers, is due 10 the structure changes (e.g. shift of volatility levels) in the volatility processes, which SV model cannot capture. This work deals with the problem by bringing in the SV model based on Hidden Markov Models (HMMs), called HMM-SV model. Via hidden states, HMMs allow for periods 'with different volatility levels characterized by the hidden states. Within each state, SV model is applied to model conditional volatility. Empirical analysis shows that our model, not only takes care of the structure changes (hence giving better volatility forecasts), but also helps to establish an proficient forecasting structure for volatility models. Keywords: Forecasting, Hidden Markov model, Stochastic volatility, stock exchange 1.0 Introduction A great deal of attention has been paid to modeling and forecasting the volatility of stock exchange index via stochastic volatility (SV) model in finance, as well as empirical literature.
    [Show full text]