Monte Carlo in Bayesian Statistics

Similar documents
Riemann Manifold Methods in Bayesian Statistics

Manifold Monte Carlo Methods

Markov Chain Monte Carlo methods

BAYESIAN METHODS FOR VARIABLE SELECTION WITH APPLICATIONS TO HIGH-DIMENSIONAL DATA

Bayesian Estimation of DSGE Models 1 Chapter 3: A Crash Course in Bayesian Inference

Bayesian Inference and MCMC

Efficient adaptive covariate modelling for extremes

Bayesian Phylogenetics:

Machine Learning. Probabilistic KNN.

Afternoon Meeting on Bayesian Computation 2018 University of Reading

CSC 2541: Bayesian Methods for Machine Learning

Markov Chain Monte Carlo, Numerical Integration

Riemann manifold Langevin and Hamiltonian Monte Carlo methods

(5) Multi-parameter models - Gibbs sampling. ST440/540: Applied Bayesian Analysis

an introduction to bayesian inference

Parameter estimation and forecasting. Cristiano Porciani AIfA, Uni-Bonn

Who was Bayes? Bayesian Phylogenetics. What is Bayes Theorem?

Bayesian Phylogenetics

MCMC algorithms for fitting Bayesian models

Learning the hyper-parameters. Luca Martino

A Review of Pseudo-Marginal Markov Chain Monte Carlo

Risk Estimation and Uncertainty Quantification by Markov Chain Monte Carlo Methods

MCMC and Gibbs Sampling. Kayhan Batmanghelich

Statistical Methods in Particle Physics Lecture 1: Bayesian methods

Bayesian inference for multivariate extreme value distributions

Markov Chain Monte Carlo

Slice Sampling with Adaptive Multivariate Steps: The Shrinking-Rank Method

Gradient-based Monte Carlo sampling methods

Nested Sampling. Brendon J. Brewer. brewer/ Department of Statistics The University of Auckland

19 : Slice Sampling and HMC

Answers and expectations

Likelihood-free MCMC

Down by the Bayes, where the Watermelons Grow

Bayesian Inference in GLMs. Frequentists typically base inferences on MLEs, asymptotic confidence

Tutorial on ABC Algorithms

VCMC: Variational Consensus Monte Carlo

Metropolis-Hastings Algorithm

Quasi-Newton Methods for Markov Chain Monte Carlo

arxiv: v4 [stat.co] 4 May 2016

Bayes Factors, posterior predictives, short intro to RJMCMC. Thermodynamic Integration

Markov Chain Monte Carlo

LECTURE 15 Markov chain Monte Carlo

CPSC 540: Machine Learning

Log Gaussian Cox Processes. Chi Group Meeting February 23, 2016

Large Scale Bayesian Inference

1 Geometry of high dimensional probability distributions

Bayesian Estimation with Sparse Grids

ComputationalToolsforComparing AsymmetricGARCHModelsviaBayes Factors. RicardoS.Ehlers

Efficient Bayesian Inference for Conditionally Autoregressive Models. Justin Angevaare. A Thesis presented to The University of Guelph

Bayesian Estimation of Input Output Tables for Russia

STA 4273H: Statistical Machine Learning

Notes on pseudo-marginal methods, variational Bayes and ABC

MONTE CARLO METHODS. Hedibert Freitas Lopes

Calibration of Stochastic Volatility Models using Particle Markov Chain Monte Carlo Methods

Kernel Adaptive Metropolis-Hastings

Infer relationships among three species: Outgroup:

Monte Carlo Techniques for Regressing Random Variables. Dan Pemstein. Using V-Dem the Right Way

TEORIA BAYESIANA Ralph S. Silva

Bagging During Markov Chain Monte Carlo for Smoother Predictions


Bayesian Inference for Discretely Sampled Diffusion Processes: A New MCMC Based Approach to Inference

Lecture 8: Bayesian Estimation of Parameters in State Space Models

Density Estimation. Seungjin Choi

MCMC for big data. Geir Storvik. BigInsight lunch - May Geir Storvik MCMC for big data BigInsight lunch - May / 17

Introduction to Bayesian Statistics 1

Bayesian Methods for Machine Learning

Metropolis-Hastings sampling

Reminder of some Markov Chain properties:

Phylogenetics: Bayesian Phylogenetic Analysis. COMP Spring 2015 Luay Nakhleh, Rice University

17 : Markov Chain Monte Carlo

eqr094: Hierarchical MCMC for Bayesian System Reliability

ST 740: Markov Chain Monte Carlo

arxiv: v1 [stat.ml] 23 Jan 2019

Markov Chain Monte Carlo Methods

17 : Optimization and Monte Carlo Methods

Bayesian covariate models in extreme value analysis

On Markov chain Monte Carlo methods for tall data

Multivariate Normal & Wishart

Session 5B: A worked example EGARCH model

MCMC Methods: Gibbs and Metropolis

MCMC: Markov Chain Monte Carlo

Bayesian Analysis of Massive Datasets Via Particle Filters

Approximate Bayesian Computation: a simulation based approach to inference

Lecture 7 and 8: Markov Chain Monte Carlo

Item Parameter Calibration of LSAT Items Using MCMC Approximation of Bayes Posterior Distributions

Mix & Match Hamiltonian Monte Carlo

STA 4273H: Sta-s-cal Machine Learning

The University of Auckland Applied Mathematics Bayesian Methods for Inverse Problems : why and how Colin Fox Tiangang Cui, Mike O Sullivan (Auckland),

Particle Metropolis-Hastings using gradient and Hessian information

Bayesian Nonparametric Regression for Diabetes Deaths

Part 1: Expectation Propagation

Computational statistics

Principles of Bayesian Inference

Variational Scoring of Graphical Model Structures

Bayesian inference: what it means and why we care

Computer Vision Group Prof. Daniel Cremers. 10a. Markov Chain Monte Carlo

Eco517 Fall 2013 C. Sims MCMC. October 8, 2013

Introduction to Stochastic Gradient Markov Chain Monte Carlo Methods

Bayes Nets: Sampling

Lecture 2: From Linear Regression to Kalman Filter and Beyond

Transcription:

Monte Carlo in Bayesian Statistics Matthew Thomas SAMBa - University of Bath m.l.thomas@bath.ac.uk December 4, 2014 Matthew Thomas (SAMBa) Monte Carlo in Bayesian Statistics December 4, 2014 1 / 16

Overview Motivation Metropolis-Hastings Hamiltonian Monte Carlo Riemann Manifold Hamiltonian Monte Carlo Example - Heart Dataset Matthew Thomas (SAMBa) Monte Carlo in Bayesian Statistics December 4, 2014 2 / 16

Motivation Bayes Theorem f (θ x) = Posterior Likelihood Prior f (x θ)f (θ) f (x) f (θ x) f (x θ) f (θ) Marginal Likelihood c 1 = f (x) = Often analytically intractable How do we find the Posterior? f (x θ)f (θ)dθ Matthew Thomas (SAMBa) Monte Carlo in Bayesian Statistics December 4, 2014 3 / 16

Markov Chain Monte Carlo (MCMC) MCMC general technique adopted in Bayesian Statistics Idea: Design a Markov chain with stationary distribution as the posterior Simulate values Perform inferences Most commonly used is Metropolis-Hastings: Matthew Thomas (SAMBa) Monte Carlo in Bayesian Statistics December 4, 2014 4 / 16

Metropolis-Hastings Algorithm Choose a suitable proposal distribution q ( θ θ (t)) Choose an arbitrary starting point θ (0) such that f (θ (0) x) > 0 At time t, Sample a point from θ θ (t 1) q ( θ θ (t 1)) Calculate the acceptance probability ( α θ (t 1) θ ) { q(θ (t 1) θ )f (θ } x) = min 1, q(θ θ (t 1) )f (θ (t 1) x) Generate U Uniform(0, 1) α ( θ (t 1) θ ) U then accept proposed point θ (t) = θ Otherwise reject proposed point θ (t) = θ (t 1) Matthew Thomas (SAMBa) Monte Carlo in Bayesian Statistics December 4, 2014 5 / 16

Question Is there a method that reduces correlation? Matthew Thomas (SAMBa) Monte Carlo in Bayesian Statistics December 4, 2014 6 / 16

Hamiltonian Monte Carlo method Let f (θ x) f (x θ)f (θ) be the posterior distribution (θ R N ) Let f (p) N(0, M) be an independent auxiliary variable interpreted as a momentum variable and the covariance matrix M denotes a mass matrix. (p R N ) The joint density follows in factorised form as f (θ, p) = f (θ x)f (p) Define the Hamiltonian H(θ, p) = log (f (θ, p)) = log(f (θ x)) log(f (p)) The Hamiltonian Dynamics = L(θ) + 1 2 log(2π)n M + 1 2 pt M 1 p dθ dt = H p dp dt = H θ Matthew Thomas (SAMBa) Monte Carlo in Bayesian Statistics December 4, 2014 7 / 16

Hamiltonian Monte Carlo method Algorithm Set up the system as defined in the previous slide Choose an arbitrary starting point θ (0) such that f (θ (0) x) > 0 At time t, Generate p N(0, M) (θ (0), p (0)) = (θ (t 1), p) Perform Leapfrog algorithm to numerically solve (θ, p ) until time T Calculate the acceptance probability ( α θ (t 1) θ ) { } = min 1, exp[h(θ(t 1), p)] exp[h(θ, p )] Generate U Uniform(0, 1) α ( θ (t 1) θ ) U then accept proposed point θ (t) = θ Otherwise reject proposed point θ (t) = θ (t 1) Matthew Thomas (SAMBa) Monte Carlo in Bayesian Statistics December 4, 2014 8 / 16

Question Why are shortest distances on a 2D map non-linear when the shortest distance is a straight line? Matthew Thomas (SAMBa) Monte Carlo in Bayesian Statistics December 4, 2014 9 / 16

Riemann Manifold Hamiltonian Monte Carlo method Let f (θ x) f (x θ)f (θ) be the posterior distribution (θ R N ) Let f (p θ) N(0, G(θ)) be an auxiliary variable in a Riemann manifold with metric tensor, G(θ) (often the Fisher Information Matrix) The joint density follows in factorised form as f (θ, p) = f (θ x)f (p θ) Define the Hamiltonian H(θ, p) = log (f (θ, p)) = log(f (θ x)) log(f (p θ)) The Hamiltonian Dynamics = L(θ) + 1 2 log(2π)n G(θ) + 1 2 pt G(θ) 1 p dθ dt = H p dp dt = H θ Matthew Thomas (SAMBa) Monte Carlo in Bayesian Statistics December 4, 2014 10 / 16

Riemann Manifold Hamiltonian Monte Carlo method Algorithm Set up the system as defined in the previous slide Choose an arbitrary starting point θ (0) such that f (θ (0) x) > 0 At time t, Generate p N(0, G(θ (t 1) )) (θ (0), p (0)) = (θ (t 1), p) Perform Leapfrog algorithm to numerically solve (θ, p ) until time T Calculate the acceptance probability ( α θ (t 1) θ ) { } = min 1, exp[h(θ(t 1), p)] exp[h(θ, p )] Generate U Uniform(0, 1) α ( θ (t 1) θ ) U then accept proposed point θ (t) = θ Otherwise reject proposed point θ (t) = θ (t 1) Matthew Thomas (SAMBa) Monte Carlo in Bayesian Statistics December 4, 2014 11 / 16

Effective Sample Size Effective Sample Size (ESS) The effective sample size gives an estimate of the equivalent number of independent observations that the chain represents. n 1 + 2 k=1 ρ k Matthew Thomas (SAMBa) Monte Carlo in Bayesian Statistics December 4, 2014 12 / 16

Example - Heart Dataset Bayesian Logistic Regression model Wish to sample from the posterior of covariates Dataset contained 13 Covariates for 270 data points Chain was run 10 times for 10000 iterations 5000 considered burn-in ESS calculated Matthew Thomas (SAMBa) Monte Carlo in Bayesian Statistics December 4, 2014 13 / 16

Example - Heart Dataset Matthew Thomas (SAMBa) Monte Carlo in Bayesian Statistics December 4, 2014 14 / 16

Example - Heart Dataset Min ESS Median ESS Max ESS Metropolis-Hastings 418 637 905 Hamiltonian 3246 3647 4003 Riemann Manifold Hamiltonian 4862 5000 5000 Matthew Thomas (SAMBa) Monte Carlo in Bayesian Statistics December 4, 2014 15 / 16

References Girolami, Mark, and Ben Calderhead. Riemann manifold langevin and hamiltonian monte carlo methods. Journal of the Royal Statistical Society: Series B (Statistical Methodology) 73.2 (2011): 123-214. Matthew Thomas (SAMBa) Monte Carlo in Bayesian Statistics December 4, 2014 16 / 16

Any Questions Matthew Thomas (SAMBa) Monte Carlo in Bayesian Statistics December 4, 2014 17 / 16