Skip to content

Commit 8dd0b22

Browse files
committed
added notes
1 parent b116e5b commit 8dd0b22

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: probability.ml

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
(* Implementing my own probabilistic programming language - based on Church *)
2+
13
let bernoulli p =
24
let flip = Random.float 1.0 in
35
if flip < p then 1 else 0
@@ -180,5 +182,8 @@ let takeSample = (fun () ->
180182
(* implementations of query
181183
--much of the difficulty of implementing probabilistic languages / models
182184
is finding useful ways to do conditional inference - i.e to sample efficiently
185+
186+
Rejection sampling is a useful starting point, but is often not efficient
183187
*)
184188

189+

0 commit comments

Comments
 (0)