570 likes | 764 Views
Bayesian Inference. Will Penny. Wellcome Centre for Neuroimaging, UCL, UK. SPM for fMRI Course, London, October 21st, 2010. What is Bayesian Inference ?. (From Daniel Wolpert). Bayesian segmentation and normalisation. realignment. smoothing. general linear model. Gaussian
E N D
Bayesian Inference Will Penny Wellcome Centre for Neuroimaging, UCL, UK. SPM for fMRI Course, London, October 21st, 2010
What is Bayesian Inference ? (From Daniel Wolpert)
Bayesian segmentation and normalisation realignment smoothing general linear model Gaussian field theory statistical inference normalisation p <0.05 template
Bayesian segmentation and normalisation Smoothness modelling realignment smoothing general linear model Gaussian field theory statistical inference normalisation p <0.05 template
Bayesian segmentation and normalisation Smoothness estimation Posterior probability maps (PPMs) realignment smoothing general linear model Gaussian field theory statistical inference normalisation p <0.05 template
Bayesian segmentation and normalisation Smoothness estimation Posterior probability maps (PPMs) Dynamic Causal Modelling realignment smoothing general linear model Gaussian field theory statistical inference normalisation p <0.05 template
Overview • Parameter Inference • GLMs, PPMs, DCMs • Model Inference • Model Evidence, Bayes factors (cf. p-values) • Model Estimation • Variational Bayes • Groups of subjects • RFX model inference, PPM model inference
Overview • Parameter Inference • GLMs, PPMs, DCMs • Model Inference • Model Evidence, Bayes factors (cf. p-values) • Model Estimation • Variational Bayes • Groups of subjects • RFX model inference, PPM model inference
General Linear Model Model:
Prior Model: Prior:
Prior Model: Prior: Sample curves from prior (before observing any data) Mean curve
Priors and likelihood Model: Prior: Likelihood:
Priors and likelihood Model: Prior: Likelihood:
Posterior after one observation Model: Prior: Likelihood: Bayes Rule: Posterior:
Posterior after two observations Model: Prior: Likelihood: Bayes Rule: Posterior:
Posterior after eight observations Model: Prior: Likelihood: Bayes Rule: Posterior:
Overview • Parameter Inference • GLMs, PPMs, DCMs • Model Inference • Model Evidence, Bayes factors (cf. p-values) • Model Estimation • Variational Bayes • Groups of subjects • RFX model inference, PPM model inference
q Smooth Y(RFT) prior precision of GLM coeff prior precision of AR coeff aMRI Observation noise GLM AR coeff (correlated noise) ML Bayesian observations Posterior Probability Maps
ROC curve Sensitivity 1-Specificity
Display only voxels that exceed e.g. 95% activation threshold Probability mass p Posterior density probability of getting an effect, given the data mean: size of effectcovariance: uncertainty Posterior Probability Maps Mean (Cbeta_*.img) PPM (spmP_*.img) Std dev (SDbeta_*.img)
Overview • Parameter Inference • GLMs, PPMs, DCMs • Model Inference • Model Evidence, Bayes factors (cf. p-values) • Model Estimation • Variational Bayes • Groups of subjects • RFX model inference, PPM model inference
SPC V1 V5 Dynamic Causal Models Posterior Density Priors Are Physiological V5->SPC
Overview • Parameter Inference • GLMs, PPMs, DCMs • Model Inference • Model Evidence, Bayes factors (cf. p-values) • Model Estimation • Variational Bayes • Groups of subjects • RFX model inference, PPM model inference
Bayes Rule: normalizing constant Model Evidence Model evidence
SPC V1 V5 SPC V1 Model Model Evidence Prior Posterior V5 Bayes factor: Model, m=j Model, m=i
Model Model Evidence Prior Posterior Bayes factor: For Equal Model Priors
Overview • Parameter Inference • GLMs, PPMs, DCMs • Model Inference • Model Evidence, Bayes factors (cf. p-values) • Model Estimation • Variational Bayes • Groups of subjects • RFX model inference, PPM model inference
Bayes Factors versus p-values Two sample t-test Subjects Conditions
p=0.05 Bayesian BF=3 Classical
BF=20 Bayesian BF=3 Classical
p=0.05 BF=20 Bayesian BF=3 Classical
p=0.01 p=0.05 BF=20 Bayesian BF=3 Classical
Overview • Parameter Inference • GLMs, PPMs, DCMs • Model Inference • Model Evidence, Bayes factors (cf. p-values) • Model Estimation • Variational Bayes • Groups of subjects • RFX model inference, PPM model inference
Free Energy Optimisation Initial Point Precisions, a Parameters, q
Overview • Parameter Inference • GLMs, PPMs, DCMs • Model Inference • Model Evidence, Bayes factors (cf. p-values) • Model Estimation • Variational Bayes • Groups of subjects • RFX model inference, PPM model inference
u2 u2 x3 x3 x2 x2 x1 x1 u1 u1 incorrect model (m2) correct model (m1) m2 m1 Figure 2
LD LD|LVF LD|RVF LD|LVF LD LD RVF stim. LD LVF stim. RVF stim. LD|RVF LVF stim. MOG MOG MOG MOG LG LG LG LG FG FG FG FG m2 m1 Models from Klaas Stephan
Random Effects (RFX) Inference log p(yn|m)
Gibbs Sampling Initial Point Frequencies, r Stochastic Method Assignments, A
log p(yn|m) Gibbs Sampling
LD LD|LVF LD|RVF LD|LVF LD LD RVF stim. LD LVF stim. RVF stim. LD|RVF LVF stim. MOG MOG MOG MOG LG LG LG LG FG FG FG FG m2 m1 11/12=0.92
Overview • Parameter Inference • GLMs, PPMs, DCMs • Model Inference • Model Evidence, Bayes factors (cf. p-values) • Model Estimation • Variational Bayes • Groups of subjects • RFX model inference, PPM model inference
Log-evidence maps subject 1 model 1 subject N model K Compute log-evidence for each model/subject PPMs for Models