Live data from Hacker News

An Introduction to Probabilistic Programming

arxiv.org

31–40 of 43 posts

Re: An Introduction to Probabilistic Programming

#31
post #17
post #12

is Probabilistic Programming the same thing as doing MCMC (Markov chain Monte Carlo)? How do these two ideas relate? Or is one a subset of the other?

Probabilistic programming uses computer science techniques to do automated statistical modeling. For example, imagine I have a coin, and I want to discover if it is biased, i.e. if it lands on heads more often than tails. In a probabilistic programming framework, I can express my model as a simple Bernoulli model, `x ~ Bernoulli(p)`, and then automatically estimate the bias parameter `p` given some data (do "inferenc…

I am not an expert in this but I find the math behind HMC to be out of this world as described in this mindblowing twitter thread:

https://twitter.com/betanalpha/status/1234576972132626445

Re: An Introduction to Probabilistic Programming

#32
There is also ProbLog (Probabilistic Prolog)[1][2] and even extension of it with a deep learning - DeepProbLog[3]. Personally, though, I hope that new ISO Prolog implementation in Rust, aiming for the performance, Scryer Prolog[4] will add the probabilistic capability [5].

[1] https://dtai.cs.kuleuven.be/problog/

[2] https://github.com/ML-KULeuven/problog

[3] https://github.com/ML-KULeuven/deepproblog

[4] http://github.com/mthom/scryer-prolog/

[5] https://github.com/mthom/scryer-prolog/issues/69

Re: An Introduction to Probabilistic Programming

#34
Anyone have a Haskell version? This or quantum computing seems like you could really just package up with some fancy monad, instead of just a single state it encapsulates a distribution, and you just apply abstract transformations ontop as usual.

Re: An Introduction to Probabilistic Programming

#35
post #26

Can someone please give an example of how this could be used in practice? On the surface probability seems antithetical to the explicit well-defined determinism of programming.

You can generate a posterior distribution for any overdetermined problem. Basically, any scientific problem, as they must infer models inputs (parameteric or non-parametric) from observed model outputs (data).

Determinism is a nice illusion that quickly breaks down on real data. Scientific problems are non-unique and noise or inadequate models cause data and model to not mesh with one another. Deterministic answers have the property of being precisely wrong as opposed to mostly correct.

Re: An Introduction to Probabilistic Programming

#36

Earlier quoted context omitted.

thanks for this. there is also Probabilistic Models of Cognition [0] by one of the authors. I wish however that they stuck to Church language [1] [0] https://probmods.org/ [1] http://web.stanford.edu/~ngoodman/papers/POPL2013-abstract.p...

I wish I could have Church as a Jupyter notebook/lab Kernel. Would make it much easier to play around with the language when trying to wrap my mind around the church version of probmods.

Not exactly the same thing but try clojure with anglican in nextjournal to see if it fits your needs.

Re: An Introduction to Probabilistic Programming

#38
On the fun side, in the book :

"Every little kid knows that even the slightest variation in the placement of a firecracker or the most seemingly minor imperfection of a glue joint will lead to dramatically different model airplane explosions."

I've never made my model airplane explode (after the many hours needed to build them).

But I burnt ants :-)

Re: An Introduction to Probabilistic Programming

#39

Earlier quoted context omitted.

I wish I could have Church as a Jupyter notebook/lab Kernel. Would make it much easier to play around with the language when trying to wrap my mind around the church version of probmods.

Not exactly the same thing but try clojure with anglican in nextjournal to see if it fits your needs.

Last time I tried putting a lisp into jupyter as a playground for church, I realized that I was missing all the plotting features to really get anywhere and before I realized it, I had to stop my self from reimplementing church’s standard library.

I’ll have a look on google on the names you mentioned :)

Re: An Introduction to Probabilistic Programming

#40
post #26

Can someone please give an example of how this could be used in practice? On the surface probability seems antithetical to the explicit well-defined determinism of programming.

The best example I've seen is the birthday paradox. How likely is it for 2 people in a N person class to have the same birthday? You can solve this deterministically using math pretty easily.

But if you modify the question to ask how likely it is for 3 people, or you add things like February 29th and leap years, or you add the fact that births are more likely during summer months, then it becomes extremely difficult to solve this deterministically. Instead, you run a Monte Carlo simulation to get approximate probabilities. This is much simpler to code and can be easily modified to fit new conditions.

A Monte Carlo simulation is probabilistic because you use random numbers in the simulation and you won't get a 100% perfect answer but you'll get close enough (and you can do some math to get error bounds).

Post reply on HN