70

4 bayesian Inference Primer - Université du Luxembourg

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Bayesian inferencePrimer

3

4

5

6

7

8

9

LikelihoodPosterior

Prior

10

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

11

⇡(x) ⇡(y|x)

⇡(x|y)

Bayes’ theorem

posterior =prior⇥ likelihood

evidence

priorposterior likelihood

8/31/2015 12

Bayes’ theorem

Parameter identification: Bayesian approach

8/31/2015 13

Bayes’ theorem

Descriptive formula

Parameter identification: Bayesian approach

8/31/2015 14

A discrete example of Bayes’ theorem

8/31/2015 15

8/31/2015 16

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

8/31/2015 17

P=1/6

8/31/2015 18

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

8/31/2015 19

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

8/31/2015 20

a

8/31/2015 21

b

8/31/2015 22

c

8/31/2015 23

d

8/31/2015 24

a b

cd

8/31/2015 25

a b

cd

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

27

a b

cd

28

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

a b

cd

29

30

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

a b

cd

a b

cd

31

a b

cd

32

a b

cd

33

a

bc

d

34

a

bc

d

35

ab

c d

36

a b

cd

a

bc

d

ab

c d

a

bc

d

37

a b

cd

a

bc

d

ab

c d

a

bc

d

Four possibilities

38

Four possibilities

a b

cd

39

Four possibilities

a b

cd

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

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

8/31/2015 42

Probability that this was the face of the dice knowing

8/31/2015 43

P=0

P=⅛

P=¼

8/31/2015 44

P=0

P=⅛

P=¼

P=1/6

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

Stress-strain data

8/31/2015 46

Identify the parameters

8/31/2015 47

Model

observations=f(parameters, error)

Construct the likelihood function

8/31/2015 48

Additive noise model

Noise model

8/31/2015 49

Likelihood function for additive model

Likelihood function

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

Constitutive model

Observed data

Constitutive law: linear elasticity

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

Prior information on Young’s modulus

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

Error model (noise)

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

Likelihood function

Likelihood function

54

Bayes’ theorem: calculate the posterior

posterior =prior⇥ likelihood

evidence

55

⇡(x)

Bayes’ theorem: calculate the posterior

posterior =prior⇥ likelihood

evidence

prior

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

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

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)

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

The 99.73% rule: observations

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

Propagation of the uncertainty to the constitutive model

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

Perfect plasticity

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

Perfect plasticity

Constitutive model

x(2)

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

Observed data

Modified form for constitutive model

Perfect plasticity

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

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

Posterior probability

Perfect plasticity

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

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

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

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

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

Perfect plasticity: amplitude plot