Skip to Main Content

Practical Probabilistic Programming

Published by Manning
Distributed by Simon & Schuster


Practical Probabilistic Programming introduces the working programmer to probabilistic programming. In it, you'll learn how to use the PP paradigm to model application domains and then express those probabilistic models in code. Although PP can seem abstract, in this book you'll immediately work on practical examples, like using the Figaro language to build a spam filter and applying Bayesian and Markov networks, to diagnose computer system data problems and recover digital images.

Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.

About the Technology

The data you accumulate about your customers, products, and website users can help you not only to interpret your past, it can also help you predict your future! Probabilistic programming uses code to draw probabilistic inferences from data. By applying specialized algorithms, your programs assign degrees of probability to conclusions. This means you can forecast future events like sales trends, computer system failures, experimental outcomes, and many other critical concerns.

About the Book

Practical Probabilistic Programming introduces the working programmer to probabilistic programming. In this book, you’ll immediately work on practical examples like building a spam filter, diagnosing computer system data problems, and recovering digital images. You’ll discover probabilistic inference, where algorithms help make extended predictions about issues like social media usage. Along the way, you’ll learn to use functional-style programming for text analysis, object-oriented models to predict social phenomena like the spread of tweets, and open universe models to gauge real-life social media usage. The book also has chapters on how probabilistic models can help in decision making and modeling of dynamic systems.

What's Inside

  • Introduction to probabilistic modeling
  • Writing probabilistic programs in Figaro
  • Building Bayesian networks
  • Predicting product lifecycles
  • Decision-making algorithms

About the Reader

This book assumes no prior exposure to probabilistic programming. Knowledge of Scala is helpful.

About the Author

Avi Pfeffer is the principal developer of the Figaro language for probabilistic programming.

Table of Contents


  1. Probabilistic programming in a nutshell
  2. A quick Figaro tutorial
  3. Creating a probabilistic programming application

  5. Probabilistic models and probabilistic programs
  6. Modeling dependencies with Bayesian and Markov networks
  7. Using Scala and Figaro collections to build up models
  8. Object-oriented probabilistic modeling
  9. Modeling dynamic systems

  11. The three rules of probabilistic inference
  12. Factored inference algorithms
  13. Sampling algorithms
  14. Solving other inference tasks
  15. Dynamic reasoning and parameter learning