Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Intro to Probabilistic Programming
and Clojure’s Anglican
Dr. Nils Blum-Oeste

EuroClojure 2017, Berlin
Who is talking?
Probabilistic Programming:
Why? What? How?
Anglican: Examples
Physics
Chemistry
Quantitative Modelling
Complex Systems
😍
Smart Home Energy Model
Probabilistic Programming
Why? What? How?
Predict the future
Infer causes of observations
Improve models from evidence
Why?
Compared to other machine learning techniques
incorporates domain knowledge
models are explainable and
understandable
work...
Don’t think of Probabilistic
Programming vs other techniques,
they can complement each other
What is a Probabilistic
Programming System?
Bayesian Probability: The belief or
confidence in an event occurring
Bayes Rule
Marginal Likelihood
PriorLikelihood
Posterior
Hypothesis Evidence
Markov chain Monte Carlo
Sampling
sample at n fixed positions
too expensive for multiple
dimensions
random sample
next sample
random step
sample density reflects
probabilities
works for many dimensions
Probabilistic Reasoning System
Probabilistic Model
Inference Algorithm
Evidence
Queries
Answer
Probabilistic Programming System
Probabilistic Model
Inference Algorithm
Evidence
Queries
Answer
code
provided by PPS
data...
Execution model
probabilistic programs are
executed many times for inference
random choices affect the
execution path on e...
Anglican Examples
What is Anglican?
embedded language, subset of
Clojure
same syntax but different
semantics
Clojure, JVM and Anglican
avail...
A probabilistic Hello World:
Coin Toss
Sampling a fair coin with Anglican
Learning the bias of a coin
Posterior distribution after observing 20 heads and 20 tails
Example: AB-Test
Simulate user interactions
Probabilistic model
Posterior sampling
Example: Bayesian Inference
on Game Physics
The whole Clojure world available…
No guarantee for success though!
PPS beyond Anglican
Clojure, high performance:
Bayadera
Industry Standards: Stan, PyMC
Many PPS: Figaro, WebPPL,
BayesDB, …
Probabilistic Programming, my conclusions so far:
Probabilistic Programming Systems: Very low entry barrier to predict, in...
Acknowledgements
Anglican Devs: Frank Wood, David Tolpin & all contributors

Speaker Mentor: Jan Stępień

Discussions: Dra...
More Information
http://www.robots.ox.ac.uk/~fwood/anglican/index.html

http://probabilistic-programming.org
Intro to Probabilistic Programming and Clojure’s Anglican
Intro to Probabilistic Programming and Clojure’s Anglican
Intro to Probabilistic Programming and Clojure’s Anglican
Intro to Probabilistic Programming and Clojure’s Anglican
Intro to Probabilistic Programming and Clojure’s Anglican
Intro to Probabilistic Programming and Clojure’s Anglican
Intro to Probabilistic Programming and Clojure’s Anglican
Upcoming SlideShare
Loading in …5
×

Intro to Probabilistic Programming and Clojure’s Anglican

669 views

Published on

Probabilistic Programming Systems aim to merge general purpose programming with probabilistic modelling. They provide powerful statistical inference and thus allow developers to focus on the modelling with tools and environments they are comfortable with. These emerging methods are promising additions to the Data Scientist’s toolbox and an interesting, satisfying playground for programming enthusiasts. This talk is an introduction to Probabilistic Programming Systems, their use and value for the industry and Clojure’s great library “Anglican”.

Published in: Data & Analytics
  • Be the first to comment

Intro to Probabilistic Programming and Clojure’s Anglican

  1. 1. Intro to Probabilistic Programming and Clojure’s Anglican Dr. Nils Blum-Oeste EuroClojure 2017, Berlin
  2. 2. Who is talking? Probabilistic Programming: Why? What? How? Anglican: Examples
  3. 3. Physics Chemistry Quantitative Modelling Complex Systems
  4. 4. 😍
  5. 5. Smart Home Energy Model
  6. 6. Probabilistic Programming Why? What? How?
  7. 7. Predict the future Infer causes of observations Improve models from evidence Why?
  8. 8. Compared to other machine learning techniques incorporates domain knowledge models are explainable and understandable works well with small to medium data need to build a model computationally expensive (aka “slow”) + -
  9. 9. Don’t think of Probabilistic Programming vs other techniques, they can complement each other
  10. 10. What is a Probabilistic Programming System?
  11. 11. Bayesian Probability: The belief or confidence in an event occurring
  12. 12. Bayes Rule Marginal Likelihood PriorLikelihood Posterior Hypothesis Evidence
  13. 13. Markov chain Monte Carlo Sampling
  14. 14. sample at n fixed positions too expensive for multiple dimensions
  15. 15. random sample next sample random step
  16. 16. sample density reflects probabilities works for many dimensions
  17. 17. Probabilistic Reasoning System Probabilistic Model Inference Algorithm Evidence Queries Answer
  18. 18. Probabilistic Programming System Probabilistic Model Inference Algorithm Evidence Queries Answer code provided by PPS data code data
  19. 19. Execution model probabilistic programs are executed many times for inference random choices affect the execution path on each run computes the distribution from which execution results are drawn
  20. 20. Anglican Examples
  21. 21. What is Anglican? embedded language, subset of Clojure same syntax but different semantics Clojure, JVM and Anglican available to each other Anglican runs wherever you have a JVM
  22. 22. A probabilistic Hello World: Coin Toss
  23. 23. Sampling a fair coin with Anglican
  24. 24. Learning the bias of a coin
  25. 25. Posterior distribution after observing 20 heads and 20 tails
  26. 26. Example: AB-Test
  27. 27. Simulate user interactions
  28. 28. Probabilistic model
  29. 29. Posterior sampling
  30. 30. Example: Bayesian Inference on Game Physics
  31. 31. The whole Clojure world available… No guarantee for success though!
  32. 32. PPS beyond Anglican Clojure, high performance: Bayadera Industry Standards: Stan, PyMC Many PPS: Figaro, WebPPL, BayesDB, …
  33. 33. Probabilistic Programming, my conclusions so far: Probabilistic Programming Systems: Very low entry barrier to predict, infer and train domain models, but modelling requires skill Anglican: Solid solution in Clojure space with great modelling and prototyping capabilities, but inference is slow and ecosystem is lacking Research Topic: Expect maturation and extension of the probabilistic programming techniques
  34. 34. Acknowledgements Anglican Devs: Frank Wood, David Tolpin & all contributors Speaker Mentor: Jan Stępień Discussions: Dragan Djuric, Chris Wallace, David Tolpin, Christian Weilbach
  35. 35. More Information http://www.robots.ox.ac.uk/~fwood/anglican/index.html http://probabilistic-programming.org

×