Infer relationships among three species: Outgroup:

Similar documents
Bayesian phylogenetics. the one true tree? Bayesian phylogenetics

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

A Bayesian Approach to Phylogenetics

Bayesian Inference. Anders Gorm Pedersen. Molecular Evolution Group Center for Biological Sequence Analysis Technical University of Denmark (DTU)

Bayesian Phylogenetics

Bayesian Phylogenetics:

Bayesian inference & Markov chain Monte Carlo. Note 1: Many slides for this lecture were kindly provided by Paul Lewis and Mark Holder

Bayesian Phylogenetics

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

Bayesian Inference using Markov Chain Monte Carlo in Phylogenetic Studies

Monte Carlo in Bayesian Statistics

Bayesian Classification and Regression Trees

Bayesian inference. Fredrik Ronquist and Peter Beerli. October 3, 2007

Phylogenetic Inference using RevBayes

Markov Chain Monte Carlo

Bayesian Methods in Multilevel Regression

Forecast combination and model averaging using predictive measures. Jana Eklund and Sune Karlsson Stockholm School of Economics

Some of these slides have been borrowed from Dr. Paul Lewis, Dr. Joe Felsenstein. Thanks!

Advanced Statistical Modelling

Answers and expectations

Machine Learning for Data Science (CS4786) Lecture 24

Markov Chain Monte Carlo methods

17 : Markov Chain Monte Carlo

Molecular Evolution & Phylogenetics

ST 740: Markov Chain Monte Carlo

Statistical Methods in Particle Physics Lecture 1: Bayesian methods

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

Down by the Bayes, where the Watermelons Grow

Penalized Loss functions for Bayesian Model Choice

Computational statistics

Markov Chain Monte Carlo (MCMC) and Model Evaluation. August 15, 2017

Bayesian Regression Linear and Logistic Regression

Bayesian Inference in Astronomy & Astrophysics A Short Course

SAMSI Astrostatistics Tutorial. More Markov chain Monte Carlo & Demo of Mathematica software

Introduction to Bayesian Data Analysis

Bayesian Estimation of Input Output Tables for Russia

MCMC and Gibbs Sampling. Kayhan Batmanghelich

Molecular Epidemiology Workshop: Bayesian Data Analysis

STA 4273H: Statistical Machine Learning

Bayesian room-acoustic modal analysis

Practical Bayesian Optimization of Machine Learning. Learning Algorithms

An introduction to Bayesian reasoning in particle physics

LECTURE 15 Markov chain Monte Carlo

Statistical Methods in Particle Physics Lecture 2: Limits and Discovery

Introduction to Systems Analysis and Decision Making Prepared by: Jakub Tomczak

Machine Learning. Probabilistic KNN.

Bayesian Networks in Educational Assessment

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

Learning Bayesian Networks for Biomedical Data

Principles of Bayesian Inference

Recent Advances in Bayesian Inference Techniques

Markov Networks.

Bayesian Inference. Chapter 1. Introduction and basic concepts

STAT 425: Introduction to Bayesian Analysis

MCMC: Markov Chain Monte Carlo

CPSC 540: Machine Learning

Bayes: All uncertainty is described using probability.

Likelihood NIPS July 30, Gaussian Process Regression with Student-t. Likelihood. Jarno Vanhatalo, Pasi Jylanki and Aki Vehtari NIPS-2009

An Introduction to Bayesian Networks: Representation and Approximate Inference

A Note on Lenk s Correction of the Harmonic Mean Estimator

Markov Chain Monte Carlo

April 20th, Advanced Topics in Machine Learning California Institute of Technology. Markov Chain Monte Carlo for Machine Learning

Bayes Factor Single Arm Time-to-event User s Guide (Version 1.0.0)

Accounting for Phylogenetic Uncertainty in Comparative Studies: MCMC and MCMCMC Approaches. Mark Pagel Reading University.

Lecture 12: Bayesian phylogenetics and Markov chain Monte Carlo Will Freyman

Stable Limit Laws for Marginal Probabilities from MCMC Streams: Acceleration of Convergence

Machine Learning Techniques for Computer Vision

Outline. CSE 573: Artificial Intelligence Autumn Agent. Partial Observability. Markov Decision Process (MDP) 10/31/2012

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

Reminder of some Markov Chain properties:

MCMC Sampling for Bayesian Inference using L1-type Priors

HMM part 1. Dr Philip Jackson

Sampling Algorithms for Probabilistic Graphical models

The Ising model and Markov chain Monte Carlo

Bayesian Inference and MCMC

Bayesian analysis in nuclear physics

An Introduction to Reversible Jump MCMC for Bayesian Networks, with Application

Statistical Data Analysis Stat 5: More on nuisance parameters, Bayesian methods

Efficiency of Markov Chain Monte Carlo Tree Proposals in Bayesian Phylogenetics

Discrete & continuous characters: The threshold model

Strong Lens Modeling (II): Statistical Methods

ST 740: Model Selection

Session 3A: Markov chain Monte Carlo (MCMC)

Bayesian Inference and Decision Theory

Bayesian Inference for DSGE Models. Lawrence J. Christiano

Bayesian Methods for Machine Learning

Markov chain Monte Carlo methods in atmospheric remote sensing

Bayes Nets III: Inference

Principles of Bayesian Inference

Principles of Bayesian Inference

One-minute responses. Nice class{no complaints. Your explanations of ML were very clear. The phylogenetics portion made more sense to me today.

Lecture 6 Phylogenetic Inference

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

Tutorial on Probabilistic Programming with PyMC3

Bayesian inference for multivariate extreme value distributions

Lecture 6: Markov Chain Monte Carlo

Assessing Regime Uncertainty Through Reversible Jump McMC

Lecture: Gaussian Process Regression. STAT 6474 Instructor: Hongxiao Zhu

Artificial Intelligence

an introduction to bayesian inference

Transcription:

Infer relationships among three species: Outgroup:

Three possible trees (topologies): A C B

A B C Model probability 1.0 Prior distribution Data (observations) probability 1.0 Posterior distribution

Bayes theorem Posterior distribution f ( θ Prior distribution Likelihood X ) = f ( θ ) f ( X θ ) f ( θ ) f ( X θ ) dθ Normalizing constant

Model: topology AND branch lengths θ Parameters A v 1 C topology (τ ) v 2 B v 3 v 4 v 5 D branch lengths ( v i ) (expected amount of change) θ = ( τ, v)

Posterior probability distribution f ( θ X ) Posterior probability tree 1 tree 2 tree 3 Parameter space θ

We can focus on any parameter of interest (there are no nuisance parameters) by marginalizing the posterior over the other parameters (integrating out the uncertainty in the other parameters) 20% 48% 32% tree 1 tree 2 tree 3 (Percentages denote marginal probability distribution on trees)

Why is it called marginalizing? branch length vectors ν ν ν 1 2 3 τ 1 0.10 0.05 0.05 0.20 trees τ 2 0.07 0.22 0.19 0.48 τ 3 0.12 0.06 0.14 0.32 joint probabilities 0.29 0.33 0.38 marginal probabilities

Markov chain Monte Carlo 1. Start at an arbitrary point 2. Make a small random move 3. Calculate height ratio (r) of new state to old state: 1. r > 1 -> new state accepted 2. r < 1 -> new state accepted with probability r. If new state not accepted, stay in the old state 4. Go to step 2 always accept 2a 1 2b accept sometimes 20 % 48 % 32 % The proportion of time the MCMC procedure samples from a particular parameter region is an estimate of that region s posterior probability density tree 1 tree 2 tree 3

stationary phase sampled with thinning (rapid mixing essential) burn-in

Metropoliscoupled Markov chain Monte Carlo cold chain a. k. a. MCMCMC a. k. a. heated chain (MC) 3

cold chain hot chain

cold chain hot chain

cold chain hot chain

cold chain unsuccessful swap hot chain

cold chain hot chain

cold chain hot chain

cold chain successful swap hot chain

cold chain hot chain

cold chain hot chain

cold chain successful swap hot chain

cold chain hot chain

Incremental Heating T is temperature, λ is heating coefficient 1 /( ) i = { 0,1,..., n 1} T = 1+ λi Example for λ = 0.2: i 0 1 2 3 T 1.00 0.83 0.71 0.62 f f f f Distr. 1.00 ( θ X ) 0.83 ( θ X ) 0.71 ( θ X ) ( θ X ) 0. 62 cold chain heated chains

Assessing Convergence Plateau in the trace plot (unreliable!!) Compare windows within the same run (better) Compare independent runs starting from different randomly chosen topologies (best)

Clade probability in analysis 2 Clade probability in analysis 1

Clade probability in analysis 2 Clade probability in analysis 1

Improving Convergence (Only if convergence diagnostics indicate problem!) Change tuning parameters of proposals to bring acceptance rate into the range 10 % to 70 % Propose changes to difficult parameters more often Use different proposal mechanisms Change heating temperature to bring acceptance rate of swaps between adjacent chains into the range 10 % to 70 %. Run the chain longer Increase the number of heated chains Make the model more realistic

Target distribution Too modest proposals Acceptance rate too high Poor mixing Sampled value Too bold proposals Acceptance rate too low Poor mixing Moderately bold proposals Acceptance rate intermediate Good mixing

Running MrBayes Use execute to bring data in a Nexus file into MrBayes Set the model and priors using lset and prset Run the chain using mcmc Summarize the parameter samples using sump Summarize the tree samples using sumt Note that MrBayes 3.1 runs two independent analyses by default

Ver. 3.1 Convergence Diagnostics By default performs two independent analyses starting from different random trees (mcmc nruns=2) Average standard deviation of clade frequencies calculated and presented during the run (mcmc mcmcdiagn=yes diagnfreq=1000) and written to file (.mcmc) Standard deviation of each clade frequency and potential scale reduction for branch lengths calculated with sumt Potential scale reduction calculated for all substitution model parameters with sump

Bayes theorem ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( X f X f f d X f f X f f X f θ θ θ θ θ θ θ θ = = Marginal likelihood (of the model) ) ( ), ( ) ( ), ( M X f M X f M f M X f θ θ θ = We have implicitly conditioned on a model:

Bayesian Model Choice Posterior model odds: f f 10 ( M ) ( ) 1 f X M1 ( M ) f ( X M ) 0 Bayes factor: B = f f 0 ( X M ) 1 ( X M ) 0

Bayesian Model Choice The normalizing constant in Bayes theorem, the marginal probability of the model, f(x) or f(x M), can be used for model choice f(x M) can be estimated by taking the harmonic mean of the likelihood values from the MCMC run (MrBayes will do this automatically with sump ) Any models can be compared: nested, non-nested, data-derived No correction for number of parameters Can prefer a simpler model over a more complex model Critical values in Kass and Raftery (1997)

Bayes Factor Comparisons Interpretation of the Bayes factor 2ln(B 10 ) B 10 Evidence against M 0 0 to 2 1 to 3 Not worth more than a bare mention 2 to 6 3 to 20 Positive 6 to 10 20 to 150 Strong > 10 > 150 Very strong

Resources MrBayes web site (www.mrbayes.net) MrWiki manual (on the MrBayes web site) MrBayes 3.1 command reference MrBayes 3.1 manual (pdf) with two tutorials: a simple analysis (primates.nex) and an analysis of partitioned data (cynmix.nex) Last pages of the manual contain graphical summaries of the MrBayes 3 models and most common types of proposal mechanisms MrBayes 3 chapter: complex partitioned analysis (kim.nex)

Why Bayesian? Priors: accumulate scientific knowledge Easy to deal with complex models, and current models need to be improved Computational efficiency: today hundreds of taxa, can probably be extended considerably Convergence diagnostics to detect problems with convergence Model testing with Bayes factors Model averaging using reversible-jump MCMC sampling