Top Banner
70

4 bayesian Inference Primer - Université du Luxembourg

Apr 08, 2022

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 4 bayesian Inference Primer - Université du Luxembourg
Page 2: 4 bayesian Inference Primer - Université du Luxembourg

Bayesian inferencePrimer

Page 3: 4 bayesian Inference Primer - Université du Luxembourg

3

Page 4: 4 bayesian Inference Primer - Université du Luxembourg

4

Page 5: 4 bayesian Inference Primer - Université du Luxembourg

5

Page 6: 4 bayesian Inference Primer - Université du Luxembourg

6

Page 7: 4 bayesian Inference Primer - Université du Luxembourg

7

Page 8: 4 bayesian Inference Primer - Université du Luxembourg

8

Page 9: 4 bayesian Inference Primer - Université du Luxembourg

9

LikelihoodPosterior

Prior

Page 10: 4 bayesian Inference Primer - Université du Luxembourg

10

⇡(x) ⇡(y|x)⇡(x|y)

Page 11: 4 bayesian Inference Primer - Université du Luxembourg

11

⇡(x) ⇡(y|x)

⇡(x|y)

Bayes’ theorem

posterior =prior⇥ likelihood

evidence

priorposterior likelihood

Page 12: 4 bayesian Inference Primer - Université du Luxembourg

8/31/2015 12

Bayes’ theorem

Parameter identification: Bayesian approach

Page 13: 4 bayesian Inference Primer - Université du Luxembourg

8/31/2015 13

Bayes’ theorem

Descriptive formula

Parameter identification: Bayesian approach

Page 14: 4 bayesian Inference Primer - Université du Luxembourg

8/31/2015 14

A discrete example of Bayes’ theorem

Page 15: 4 bayesian Inference Primer - Université du Luxembourg

8/31/2015 15

Page 16: 4 bayesian Inference Primer - Université du Luxembourg

8/31/2015 16

This is our prior information for the probability of each face: 1/6

Page 17: 4 bayesian Inference Primer - Université du Luxembourg

8/31/2015 17

P=1/6

Page 18: 4 bayesian Inference Primer - Université du Luxembourg

8/31/2015 18

Assume that after throwing the dice, you see the above evidence

Page 19: 4 bayesian Inference Primer - Université du Luxembourg

8/31/2015 19

Goal: determine the probability of this evidence for each face of the dice

Page 20: 4 bayesian Inference Primer - Université du Luxembourg

8/31/2015 20

a

Page 21: 4 bayesian Inference Primer - Université du Luxembourg

8/31/2015 21

b

Page 22: 4 bayesian Inference Primer - Université du Luxembourg

8/31/2015 22

c

Page 23: 4 bayesian Inference Primer - Université du Luxembourg

8/31/2015 23

d

Page 24: 4 bayesian Inference Primer - Université du Luxembourg

8/31/2015 24

a b

cd

Page 25: 4 bayesian Inference Primer - Université du Luxembourg

8/31/2015 25

a b

cd

Page 26: 4 bayesian Inference Primer - Université du Luxembourg

8/31/2015 26

a b

cd

One would never see a dot at the star positions for this face The probability of the evidence is zero

Page 27: 4 bayesian Inference Primer - Université du Luxembourg

27

Page 28: 4 bayesian Inference Primer - Université du Luxembourg

a b

cd

28

Two possibilities (a,c) and (b,d)

a b

cd

Page 29: 4 bayesian Inference Primer - Université du Luxembourg

29

Page 30: 4 bayesian Inference Primer - Université du Luxembourg

30

Also two possibilities (a,c) and (b,d)

a b

cd

a b

cd

Page 31: 4 bayesian Inference Primer - Université du Luxembourg

31

a b

cd

Page 32: 4 bayesian Inference Primer - Université du Luxembourg

32

a b

cd

Page 33: 4 bayesian Inference Primer - Université du Luxembourg

33

a

bc

d

Page 34: 4 bayesian Inference Primer - Université du Luxembourg

34

a

bc

d

Page 35: 4 bayesian Inference Primer - Université du Luxembourg

35

ab

c d

Page 36: 4 bayesian Inference Primer - Université du Luxembourg

36

a b

cd

a

bc

d

ab

c d

a

bc

d

Page 37: 4 bayesian Inference Primer - Université du Luxembourg

37

a b

cd

a

bc

d

ab

c d

a

bc

d

Four possibilities

Page 38: 4 bayesian Inference Primer - Université du Luxembourg

38

Four possibilities

a b

cd

Page 39: 4 bayesian Inference Primer - Université du Luxembourg

39

Four possibilities

a b

cd

Page 40: 4 bayesian Inference Primer - Université du Luxembourg

8/31/2015 40

a b

cda b

cd

a b

cd

a b

cd

a b

cd

a b

cd

0

2 2

4 4 4

Page 41: 4 bayesian Inference Primer - Université du Luxembourg

8/31/2015 41

a b

cda b

cd

a b

cd

a b

cd

a b

cd

a b

cd

0

2 2

4 4 4

Page 42: 4 bayesian Inference Primer - Université du Luxembourg

8/31/2015 42

Probability that this was the face of the dice knowing

Page 43: 4 bayesian Inference Primer - Université du Luxembourg

8/31/2015 43

P=0

P=⅛

P=¼

Page 44: 4 bayesian Inference Primer - Université du Luxembourg

8/31/2015 44

P=0

P=⅛

P=¼

P=1/6

Page 45: 4 bayesian Inference Primer - Université du Luxembourg

Bayesian Inference Primer - Hussein Rappel, Lars Beex, Jack Hale, Stéphane Bordas 201811/1/201545

Stress-strain data

Page 46: 4 bayesian Inference Primer - Université du Luxembourg

8/31/2015 46

Identify the parameters

Page 47: 4 bayesian Inference Primer - Université du Luxembourg

8/31/2015 47

Model

observations=f(parameters, error)

Construct the likelihood function

Page 48: 4 bayesian Inference Primer - Université du Luxembourg

8/31/2015 48

Additive noise model

Noise model

Page 49: 4 bayesian Inference Primer - Université du Luxembourg

8/31/2015 49

Likelihood function for additive model

Likelihood function

Page 50: 4 bayesian Inference Primer - Université du Luxembourg

Bayesian Inference Primer - Hussein Rappel, Lars Beex, Jack Hale, Stéphane Bordas 20188/31/201550

Constitutive model

Observed data

Constitutive law: linear elasticity

Page 51: 4 bayesian Inference Primer - Université du Luxembourg

Bayesian Inference Primer - Hussein Rappel, Lars Beex, Jack Hale, Stéphane Bordas 20188/31/201551

Prior information on Young’s modulus

Page 52: 4 bayesian Inference Primer - Université du Luxembourg

Bayesian Inference Primer - Hussein Rappel, Lars Beex, Jack Hale, Stéphane Bordas 20188/31/201552

Error model (noise)

Page 53: 4 bayesian Inference Primer - Université du Luxembourg

Bayesian Inference Primer - Hussein Rappel, Lars Beex, Jack Hale, Stéphane Bordas 20188/31/201553

Likelihood function

Likelihood function

Page 54: 4 bayesian Inference Primer - Université du Luxembourg

54

Bayes’ theorem: calculate the posterior

posterior =prior⇥ likelihood

evidence

Page 55: 4 bayesian Inference Primer - Université du Luxembourg

55

⇡(x)

Bayes’ theorem: calculate the posterior

posterior =prior⇥ likelihood

evidence

prior

Page 56: 4 bayesian Inference Primer - Université du Luxembourg

56

⇡(x) ⇡(y|x)

Bayes’ theorem: calculate the posterior

posterior =prior⇥ likelihood

evidence

prior⇡(y|x) = N(y � x✏, 0.0001)⇡(y|x) = ⇡(!) = ⇡(y � f(x))

likelihood

Page 57: 4 bayesian Inference Primer - Université du Luxembourg

57

⇡(x)

⇡(x|y)

Bayes’ theorem: calculate the posterior

posterior =prior⇥ likelihood

evidence

prior

posterior

⇡(y|x) = N(y � x✏, 0.0001)⇡(y|x) = ⇡(!) = ⇡(y � f(x))

⇡(y|x)likelihood

Page 58: 4 bayesian Inference Primer - Université du Luxembourg

Bayesian Inference Primer - Hussein Rappel, Lars Beex, Jack Hale, Stéphane Bordas 20188/31/201558

Posterior probability

⇡(x|y) = ⇡(x)⇡(y|x)R⌦ ⇡(x)⇡(y|x)dx

⇡(x)

⇡(y|x)

Page 59: 4 bayesian Inference Primer - Université du Luxembourg

Bayesian Inference Primer - Hussein Rappel, Lars Beex, Jack Hale, Stéphane Bordas 20188/31/201559

The 99.73% rule: observations

Page 60: 4 bayesian Inference Primer - Université du Luxembourg

Bayesian Inference Primer - Hussein Rappel, Lars Beex, Jack Hale, Stéphane Bordas 20188/31/201560

Propagation of the uncertainty to the constitutive model

Page 61: 4 bayesian Inference Primer - Université du Luxembourg

Bayesian Inference Primer - Hussein Rappel, Lars Beex, Jack Hale, Stéphane Bordas 201811/1/201561

Perfect plasticity

Page 62: 4 bayesian Inference Primer - Université du Luxembourg

Bayesian Inference Primer - Hussein Rappel, Lars Beex, Jack Hale, Stéphane Bordas 201811/1/201562

Perfect plasticity

Constitutive model

x(2)

Page 63: 4 bayesian Inference Primer - Université du Luxembourg

Bayesian Inference Primer - Hussein Rappel, Lars Beex, Jack Hale, Stéphane Bordas 20188/31/201563

Observed data

Modified form for constitutive model

Perfect plasticity

Page 64: 4 bayesian Inference Primer - Université du Luxembourg

Bayesian Inference Primer - Hussein Rappel, Lars Beex, Jack Hale, Stéphane Bordas 20188/31/201564

Perfect plasticity: contour plot of prior in parameter space

parameter 1

parameter 2

“wider” priorfor yield stress-> more infoneeded

“narrow” prior for E

�y0

E

Page 65: 4 bayesian Inference Primer - Université du Luxembourg

Bayesian Inference Primer - Hussein Rappel, Lars Beex, Jack Hale, Stéphane Bordas 20188/31/201565

Posterior probability

Perfect plasticity

Page 66: 4 bayesian Inference Primer - Université du Luxembourg

Bayesian Inference Primer - Hussein Rappel, Lars Beex, Jack Hale, Stéphane Bordas 20188/31/201566

Posterior probability

Perfect plasticity

likelihood for each observation1/�2

(x� µ)2

Page 67: 4 bayesian Inference Primer - Université du Luxembourg

Bayesian Inference Primer - Hussein Rappel, Lars Beex, Jack Hale, Stéphane Bordas 20188/31/201567

Posterior probability

Perfect plasticity

likelihood for each observation

stress modelstress measurement

1/�2

(x� µ)2

Page 68: 4 bayesian Inference Primer - Université du Luxembourg

Bayesian Inference Primer - Hussein Rappel, Lars Beex, Jack Hale, Stéphane Bordas 20188/31/201568

Posterior probability

Perfect plasticity

likelihood for each observation

stress modelstress measurement

1/�2

f(x|µ,�) = 1

�p2⇡

e�(x�µ)2

2�2

(x� µ)2

Difficult to compute the evidence probability: use MCMC

Page 69: 4 bayesian Inference Primer - Université du Luxembourg

Bayesian Inference Primer - Hussein Rappel, Lars Beex, Jack Hale, Stéphane Bordas 20188/31/201569

Markov-Chain Monte Carlo (MCMC) method: parameter space

too small adequate

too large too large

Page 70: 4 bayesian Inference Primer - Université du Luxembourg

Bayesian Inference Primer - Hussein Rappel, Lars Beex, Jack Hale, Stéphane Bordas 20188/31/201570

Perfect plasticity: amplitude plot