25
Class9: Quantifying Uncertainty Sai Ravela M. I. T 2012 1 Quantifying Uncertainty

Quantifying Uncertainty, Lecture 10 - MIT OpenCourseWare · 2020. 1. 4. · Class9: Bayesian Networks can be used to model dependencies and assess a Evidence b Uncertainty . Lots

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Quantifying Uncertainty, Lecture 10 - MIT OpenCourseWare · 2020. 1. 4. · Class9: Bayesian Networks can be used to model dependencies and assess a Evidence b Uncertainty . Lots

Class9:

Quantifying Uncertainty

Sai Ravela

M. I. T

2012

1

Quantifying Uncertainty

Page 2: Quantifying Uncertainty, Lecture 10 - MIT OpenCourseWare · 2020. 1. 4. · Class9: Bayesian Networks can be used to model dependencies and assess a Evidence b Uncertainty . Lots

Class9:

Hierarchical Bayesian Models

So far: Relationships at a single level of abstraction

y ∼ f (x)

Hierarchical Bayes -representation and reasoning at multiple levels of abstraction

2

Quantifying Uncertainty

Page 3: Quantifying Uncertainty, Lecture 10 - MIT OpenCourseWare · 2020. 1. 4. · Class9: Bayesian Networks can be used to model dependencies and assess a Evidence b Uncertainty . Lots

Class9:

Motivating Example: Generalized Linear Model

(1) (n)g(µi ) = β0 + β1x + . . . + β1xi i

yi ∼ P(µi ) i = 1, . . . , N

P (β0, . . . , βn|{yi }, {xi })

⇒ Estimate the posterior distribution of model parameters

3

Quantifying Uncertainty

Page 4: Quantifying Uncertainty, Lecture 10 - MIT OpenCourseWare · 2020. 1. 4. · Class9: Bayesian Networks can be used to model dependencies and assess a Evidence b Uncertainty . Lots

Class9:

A Bayesian Perspective

Lets write:

P(β0, . . . ,βn, |{yi }, {xi }) = P β, |{yi }, {xi }= P({yi }|{xi }, β)P({β, {xi })

NN = P(yi |xi , β) P(β|xi ) P(xi )

i=1 ' ' ' PredictorsLikelihood Parameters

glmfit in matlab, can find the MLE (not MAP) for parameters of Generalized linear Models.

4

Quantifying Uncertainty

Page 5: Quantifying Uncertainty, Lecture 10 - MIT OpenCourseWare · 2020. 1. 4. · Class9: Bayesian Networks can be used to model dependencies and assess a Evidence b Uncertainty . Lots

Class9:

Hyper parameters

β ∼ P(·, α̂) N P(yi |xi , β)P(β)

i N = P(yi |xi , β) P(β|α̂) P(α̂)'' '

α̂ i data parameter Hyper

parameter

Integral may be hard to evaluate; use MCMC

5

Quantifying Uncertainty

Page 6: Quantifying Uncertainty, Lecture 10 - MIT OpenCourseWare · 2020. 1. 4. · Class9: Bayesian Networks can be used to model dependencies and assess a Evidence b Uncertainty . Lots

Class9:

Graphically

NN P(βi ,α|{y }) ∝ P(y |βi )P(βi |α)P(α)

i i i=1

α

βi

yi

i = 1 . . . N repeated N times

6

Quantifying Uncertainty

Page 7: Quantifying Uncertainty, Lecture 10 - MIT OpenCourseWare · 2020. 1. 4. · Class9: Bayesian Networks can be used to model dependencies and assess a Evidence b Uncertainty . Lots

Class9:

So, how to calculate posterior -MCMC/Gibbs (very popular)

Note This is a generic mechanism to model dependancies

Examples Speech, Language, Climate,. . . ⇒ An explosion of applications

7

Quantifying Uncertainty

Page 8: Quantifying Uncertainty, Lecture 10 - MIT OpenCourseWare · 2020. 1. 4. · Class9: Bayesian Networks can be used to model dependencies and assess a Evidence b Uncertainty . Lots

Class9:

Example

(Elsner & Jagger 04) yi ∼ Poisson(λi )

log(λi ) = β0 + β1CT 1 + β2NAOI + β3CTI × NAOI

β ∼ N(µ, Σ−1)

Also read "Regression Machines" for Generalized Linear Models

8

Quantifying Uncertainty

Page 9: Quantifying Uncertainty, Lecture 10 - MIT OpenCourseWare · 2020. 1. 4. · Class9: Bayesian Networks can be used to model dependencies and assess a Evidence b Uncertainty . Lots

Class9:

Poisson Distribution

λy −λPois(y ; λ) = e (1)

y !

Mean: λ Variance: λ

9

Quantifying Uncertainty

Page 10: Quantifying Uncertainty, Lecture 10 - MIT OpenCourseWare · 2020. 1. 4. · Class9: Bayesian Networks can be used to model dependencies and assess a Evidence b Uncertainty . Lots

Class9:

Model Seasonal effects on hurricane “counts”

CTI: Cold Tongue Index (Average SST anomalies over 6N-6S; 180-90W)

NAO Index: SLP over Gibralter May-june: NAOI

Aug-October: CTI

10

Quantifying Uncertainty

Page 11: Quantifying Uncertainty, Lecture 10 - MIT OpenCourseWare · 2020. 1. 4. · Class9: Bayesian Networks can be used to model dependencies and assess a Evidence b Uncertainty . Lots

Class9:

Hierrachical Bayesian Model Specification

Solve using Gibbs Sampling µ Σ

β

λi

Yi N

(Software is available, e.g. BUGS, to solve problems like this). 11

Quantifying Uncertainty

Page 12: Quantifying Uncertainty, Lecture 10 - MIT OpenCourseWare · 2020. 1. 4. · Class9: Bayesian Networks can be used to model dependencies and assess a Evidence b Uncertainty . Lots

Class9:

Constructing priors

A. Conjugate Priors: The Gamma Distribution is a conjugate prior of the Poisson Distribution; so that is one route.

B. Non-informative Prior (flat) C. Bootstrap-Prior: Use a portion of the data to estimate

parameters by MLE.

Other parameter estimates Frequentist⇒ MLE (e.g. GLM)

12

Quantifying Uncertainty

Page 13: Quantifying Uncertainty, Lecture 10 - MIT OpenCourseWare · 2020. 1. 4. · Class9: Bayesian Networks can be used to model dependencies and assess a Evidence b Uncertainty . Lots

Class9:

Contd. Bootstrap: Sample sets k=1. . . M (with replacement) from 1851-1899 Use an

MLE Estimate of β(k)

yi ∼ Pois(λi ) (k) (k) (k)log(λi ) = β + β CTIi + β NAOIi0 1 2

+ β3 (k)CTIi × NAOIi

Estimate β(k) for each sample β(k)β(k)T T− µµnΣ−1 µ = β =

M − 1 13

Quantifying Uncertainty

Page 14: Quantifying Uncertainty, Lecture 10 - MIT OpenCourseWare · 2020. 1. 4. · Class9: Bayesian Networks can be used to model dependencies and assess a Evidence b Uncertainty . Lots

Class9:

Estimated Parameter Uncertainties

14

Quantifying Uncertainty

Page 15: Quantifying Uncertainty, Lecture 10 - MIT OpenCourseWare · 2020. 1. 4. · Class9: Bayesian Networks can be used to model dependencies and assess a Evidence b Uncertainty . Lots

Class9:

example

15

Quantifying Uncertainty

Page 16: Quantifying Uncertainty, Lecture 10 - MIT OpenCourseWare · 2020. 1. 4. · Class9: Bayesian Networks can be used to model dependencies and assess a Evidence b Uncertainty . Lots

Class9:

Generalizing

a Hierarchical relationship between variables

b All are random c Represented by directed acyclic

graphs ⇒ Bayesian Networks

A B

C

D

F

E parentchild

16

Quantifying Uncertainty

Page 17: Quantifying Uncertainty, Lecture 10 - MIT OpenCourseWare · 2020. 1. 4. · Class9: Bayesian Networks can be used to model dependencies and assess a Evidence b Uncertainty . Lots

Class9:

example

Buede et al. 17

Quantifying Uncertainty

Page 18: Quantifying Uncertainty, Lecture 10 - MIT OpenCourseWare · 2020. 1. 4. · Class9: Bayesian Networks can be used to model dependencies and assess a Evidence b Uncertainty . Lots

Class9:

example

18

Quantifying Uncertainty

Page 19: Quantifying Uncertainty, Lecture 10 - MIT OpenCourseWare · 2020. 1. 4. · Class9: Bayesian Networks can be used to model dependencies and assess a Evidence b Uncertainty . Lots

Class9:

Bayesian Networks can be used to model dependencies and assess a Evidence b Uncertainty

Lots of material and papers using Bayesian Networks. Ecological, Environmental and Climate applications are rapidly emerging.

19

Quantifying Uncertainty

Page 20: Quantifying Uncertainty, Lecture 10 - MIT OpenCourseWare · 2020. 1. 4. · Class9: Bayesian Networks can be used to model dependencies and assess a Evidence b Uncertainty . Lots

Class9:

Markov Networks

A markov chain is a Bayesian Network

We may model “lattices” through Markov Networks

Markov random field example “ two-way interactions” 20

Quantifying Uncertainty

Page 21: Quantifying Uncertainty, Lecture 10 - MIT OpenCourseWare · 2020. 1. 4. · Class9: Bayesian Networks can be used to model dependencies and assess a Evidence b Uncertainty . Lots

Class9:

Recall again

x1 x2 x3

P(x1, x2, x3) = p(x1|x2, x3)p(x2|x3)p(x3)

= p(x1|x2)p(x2|x3)p(x3)

= p(x3|x2)p(x2|x1)p(x1)

= p(x1|x2)p(x3|x2)p(x2)

21

Quantifying Uncertainty

Page 22: Quantifying Uncertainty, Lecture 10 - MIT OpenCourseWare · 2020. 1. 4. · Class9: Bayesian Networks can be used to model dependencies and assess a Evidence b Uncertainty . Lots

Class9:

The joint and conditional views

N P(x) = ψij (xij , Nc (xij )) P(xi |x\x(i , j)) = p(xij |N(xij ))

ij

22

Quantifying Uncertainty

Page 23: Quantifying Uncertainty, Lecture 10 - MIT OpenCourseWare · 2020. 1. 4. · Class9: Bayesian Networks can be used to model dependencies and assess a Evidence b Uncertainty . Lots

Class9:

For Bayesian Networks N p(x) =

i

p(xi |pa(xi ))

pa -parent

For Markov Networks N N p(x) = p(xi ) p(xi , xj )

i ij

23

Quantifying Uncertainty

Page 24: Quantifying Uncertainty, Lecture 10 - MIT OpenCourseWare · 2020. 1. 4. · Class9: Bayesian Networks can be used to model dependencies and assess a Evidence b Uncertainty . Lots

Class9:

Inference on � Markov Networks � Bayesian(Belief) Networks

Via � Graphical Models (see lecture notes).

24

Quantifying Uncertainty

Page 25: Quantifying Uncertainty, Lecture 10 - MIT OpenCourseWare · 2020. 1. 4. · Class9: Bayesian Networks can be used to model dependencies and assess a Evidence b Uncertainty . Lots

MIT OpenCourseWarehttp://ocw.mit.edu

12.S990 Quantifying UncertaintyFall 2012

For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.