Paradoxes of probabilistic programming
and how to condition on events of measure zero with infinitesimal probabilities (to appear at POPL’21) Jules Jacobs
Radboud University Nijmegen julesjacobs@gmail.com
November 23, 2020
1 / 25
Paradoxes of probabilistic programming and how to condition on - - PowerPoint PPT Presentation
Paradoxes of probabilistic programming and how to condition on events of measure zero with infinitesimal probabilities (to appear at POPL21) Jules Jacobs Radboud University Nijmegen julesjacobs@gmail.com November 23, 2020 1 / 25
Radboud University Nijmegen julesjacobs@gmail.com
1 / 25
2 / 25
3 / 25
3 / 25
3 / 25
4 / 25
4 / 25
4 / 25
4 / 25
4 / 25
4 / 25
4 / 25
5 / 25
5 / 25
5 / 25
6 / 25
6 / 25
6 / 25
6 / 25
6 / 25
6 / 25
6 / 25
7 / 25
7 / 25
7 / 25
8 / 25
8 / 25
8 / 25
8 / 25
8 / 25
8 / 25
8 / 25
8 / 25
9 / 25
9 / 25
weight = 1 function
if(!b) weight = 0 } function run(func , k){ samples = [] for(i in 1..k){ weight = 1 result = func () if(weight == 1){ samples.append(result) } } return samples }
9 / 25
weight = 1 function
if(!b) weight = 0 } function run(func , k){ samples = [] for(i in 1..k){ weight = 1 result = func () if(weight == 1){ samples.append(result) } } return samples }
9 / 25
10 / 25
10 / 25
10 / 25
10 / 25
11 / 25
12 / 25
12 / 25
12 / 25
13 / 25
1 σ √ 2πe− 1
2 ( x−µ σ )2
k=1(weightk) · (bmik)
k=1(weightk)
13 / 25
14 / 25
14 / 25
14 / 25
15 / 25
15 / 25
15 / 25
16 / 25
16 / 25
16 / 25
17 / 25
17 / 25
17 / 25
17 / 25
17 / 25
18 / 25
18 / 25
2r) − cdf(D, x − 1 2r)
19 / 25
2r) − cdf(D, x − 1 2r)
19 / 25
f (x) xn = r.
20 / 25
f (x) xn = r.
20 / 25
f u n c t i o n bmi ( width ){ h = rand ( Normal ( 1 . 7 0 , 0 . 2 ) ) w = rand ( Normal (70 , 30)) i f ( rand ( B e r n o u l l i ( 0 . 5 ) ) ) {
I n t e r v a l (h ,10∗ width )) } e l s e {
I n t e r v a l (w, width )) } r e t u r n w / hˆ2 } f u n c t i o n meters ( width ){ h = rand ( Normal ( 1 . 7 , 0 . 5 ) ) i f ( rand ( B e r n o u l l i ( 0 . 5 ) ) ) {
I n t e r v a l (h , width ) ) } r e t u r n h } f u n c t i o n d e c i b e l s ( width ){ x = rand ( Normal (10 ,5))
r e t u r n x }
21 / 25
22 / 25
22 / 25
22 / 25
23 / 25
23 / 25
24 / 25
25 / 25