Skip to content

abid8042/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers-in-Julia

Repository files navigation

Probabilistic Programming and Bayesian Methods for Hackers

Using Turing - a Probablistic programming package in the Julia language

Original content created by Cam Davidson-Pilon

Ported to Python 3 and PyMC3 by Max Margenot (@clean_utensils) and Thomas Wiecki (@twiecki) at Quantopian (@quantopian)

Ported to Julia 1.6.1 and Turing by Abid

The full Github repository is available at Original version and Julia version. The other chapters can be found on the project's homepage. We hope you enjoy the book, and we encourage any contributions!

Open the following links in new tabs.
  • Chapter 1: Introduction to Bayesian Methods

    Introduction to the philosophy and practice of Bayesian methods and answering the question, "What is probabilistic programming?" Examples include:

    • Inferring human behaviour changes from text message rates
  • Chapter 2: A little more on Turing

    We explore modeling Bayesian problems using Julia's Turing library through examples. How do we create Bayesian models? Examples include:

    • Detecting the frequency of cheating students, while avoiding liars
    • Calculating probabilities of the Challenger space-shuttle disaster
  • Chapter 3: Opening the Black Box of MCMC

    We discuss how MCMC operates and diagnostic tools.

  • Chapter 4: The Greatest Theorem Never Told

    We explore an incredibly useful, and dangerous, theorem: The Law of Large Numbers. Examples include:

    • Exploring a Kaggle dataset and the pitfalls of naive analysis
  • Chapter 5: Would you rather lose an arm or a leg?

    The introduction of loss functions and their (awesome) use in Bayesian methods. Examples include:

    • Solving the Price is Right's Showdown
    • Optimizing financial predictions
    • Winning solution to the Kaggle Dark World's competition
  • Chapter 6: Getting our prior-ities straight

    Probably the most important chapter. We draw on expert opinions to answer questions. Examples include:

    • Multi-Armed Bandits and the Bayesian Bandit solution.
    • What is the relationship between data sample size and prior?

    We explore useful tips to be objective in analysis as well as common pitfalls of priors.