Probabilistic Programming and Bayesian Methods for Hackers

Aug. 3, 2017, 9:16 p.m. By: Prakarsh Saxena

Bayesian Methods for Hackers

Probability, however intuitive and seemingly easy it is to grasp and understand, is equally difficult to program into software and codes. Even more important, and tough to encode is the Bayesian method which finds its use in a lot of ways. Cam Dividson- Pilon has attempted to encapsulate the concept of probabilistic and Bayesian methods programming from a computation/understanding- first, mathematics- second point of view in his book, ‘Bayesian Methods for Hackers’

The Holy Book of programming Bayesian Methods

Bayesian Method is one of the natural approaches to inferences, yet the concept is hidden behind piles of chapters of slow, mathematical analysis. A typical text on Bayesian inference involves two to three chapters on probability theory, and then enters what Bayesian interference is. But then too, the books don’t contain higher order examples but are shown simple and artificial ones due to mathematical intractability of most Bayesian models. This lessens the importance of the concept as it seems not- so- difficult to them.

Bayesian Methods for Hackers is designed as an introduction to Bayesian inference, of which the computational point- of- view is kept at a higher priority than the mathematical understanding of the same. This book caters to the needs of especially those, who do not have a deeper interest in the mathematical analysis but are eager to implement the Bayesian Methods for their codes. For the mathematical connoisseur, the text may quench the curiosity of the concept along with some other texts designed with mathematical analysis in mind.

The author, even after being from a strong mathematical background suffered from inadequacy of literature that would bridge the gap of theory and implementation, during his days. He felt that even though mathematical analysis is one way to approach Bayesian inferences, but since in the era of computation, computing power is cheap enough to afford to take an alternate route via probabilistic programming. The latter path is much more useful as it would deny any redundancy of deep analysis at steps. He has then chosen PyMC as the probabilistic programming language as there was no resource of examples and demonstrations in PyMC; the documentation assumes the developer must have prior Bayesian inference and probabilistic programming knowledge. The author believes PyMC is like to become a core component of Python programming soon after the recent development and scientific contributions in Python.

About the author

Cameron Davidson-Pilon currently lives in Ottawa, Canada and is currently doing analytics at Shopify. He has authored the open source book Bayesian Method for Hackers, along with the survival analysis library lifelines.

Github link: Bayesian Methods for Hackers