All Projects → jonsedar → Pymc3_vs_pystan

jonsedar / Pymc3_vs_pystan

Personal project to compare hierarchical linear regression in PyMC3 and PyStan, as presented at http://pydata.org/london2016/schedule/presentation/30/ video: https://www.youtube.com/watch?v=Jb9eklfbDyg

Projects that are alternatives of or similar to Pymc3 vs pystan

Bayesian Cognitive Modeling In Pymc3
PyMC3 codes of Lee and Wagenmakers' Bayesian Cognitive Modeling - A Pratical Course
Stars: ✭ 93 (-15.45%)
Mutual labels:  jupyter-notebook, bayesian-inference, bayesian-methods
Bayesian Analysis Recipes
A collection of Bayesian data analysis recipes using PyMC3
Stars: ✭ 479 (+335.45%)
Mutual labels:  jupyter-notebook, bayesian-inference, bayesian-methods
Rethinking Pyro
Statistical Rethinking with PyTorch and Pyro
Stars: ✭ 116 (+5.45%)
Mutual labels:  jupyter-notebook, bayesian-inference, bayesian-methods
Resources
PyMC3 educational resources
Stars: ✭ 930 (+745.45%)
Mutual labels:  jupyter-notebook, bayesian-inference
Bayesian Neural Networks
Pytorch implementations of Bayes By Backprop, MC Dropout, SGLD, the Local Reparametrization Trick, KF-Laplace, SG-HMC and more
Stars: ✭ 900 (+718.18%)
Mutual labels:  jupyter-notebook, bayesian-inference
Rhat ess
Rank-normalization, folding, and localization: An improved R-hat for assessing convergence of MCMC
Stars: ✭ 19 (-82.73%)
Mutual labels:  bayesian-inference, bayesian-methods
Dbda Python
Doing Bayesian Data Analysis, 2nd Edition (Kruschke, 2015): Python/PyMC3 code
Stars: ✭ 502 (+356.36%)
Mutual labels:  jupyter-notebook, bayesian-inference
Da Tutorials
Course on data assimilation (DA)
Stars: ✭ 43 (-60.91%)
Mutual labels:  jupyter-notebook, bayesian-methods
Deepbayes
Bayesian methods in deep learning Summer School
Stars: ✭ 15 (-86.36%)
Mutual labels:  jupyter-notebook, bayesian-methods
Bnlearn
Python package for learning the graphical structure of Bayesian networks, parameter learning, inference and sampling methods.
Stars: ✭ 51 (-53.64%)
Mutual labels:  jupyter-notebook, bayesian-inference
Alice
NIPS 2017: ALICE: Towards Understanding Adversarial Learning for Joint Distribution Matching
Stars: ✭ 80 (-27.27%)
Mutual labels:  jupyter-notebook, bayesian-inference
Pymc Example Project
Example PyMC3 project for performing Bayesian data analysis using a probabilistic programming approach to machine learning.
Stars: ✭ 90 (-18.18%)
Mutual labels:  jupyter-notebook, bayesian-inference
Bda py demos
Bayesian Data Analysis demos for Python
Stars: ✭ 781 (+610%)
Mutual labels:  jupyter-notebook, bayesian-inference
Probabilistic Programming And Bayesian Methods For Hackers
aka "Bayesian Methods for Hackers": An introduction to Bayesian methods + probabilistic programming with a computation/understanding-first, mathematics-second point of view. All in pure Python ;)
Stars: ✭ 23,912 (+21638.18%)
Mutual labels:  jupyter-notebook, bayesian-methods
Pycurious
Python package for computing the Curie depth from the magnetic anomaly
Stars: ✭ 22 (-80%)
Mutual labels:  jupyter-notebook, bayesian-inference
Edward
A probabilistic programming language in TensorFlow. Deep generative models, variational inference.
Stars: ✭ 4,674 (+4149.09%)
Mutual labels:  jupyter-notebook, bayesian-methods
Hmm for autonomous driving
🎓 Educational application of Hidden Markov Model to Autonomous Driving 🚕🚙🚗
Stars: ✭ 39 (-64.55%)
Mutual labels:  jupyter-notebook, bayesian-inference
Nimble
The base NIMBLE package for R
Stars: ✭ 95 (-13.64%)
Mutual labels:  bayesian-inference, bayesian-methods
Bayesian Stats Modelling Tutorial
How to do Bayesian statistical modelling using numpy and PyMC3
Stars: ✭ 480 (+336.36%)
Mutual labels:  jupyter-notebook, bayesian-inference
Bayesian Machine Learning
Notebooks about Bayesian methods for machine learning
Stars: ✭ 1,202 (+992.73%)
Mutual labels:  jupyter-notebook, bayesian-methods
Jonathan Sedar Personal Project

PyMC3 Vs PyStan Comparison

Spring 2016

This set of Notebooks and scripts comprise the pymc3_vs_pystan personal project by Jonathan Sedar of Applied AI Ltd, written primarily for presentation at the PyData London 2016 Conference.

The project demonstrates hierarchical linear regression using two Bayesian inference frameworks: PyMC3 and PyStan. The project borrows heavily from code written for Applied AI Ltd and is supplied here for educational purposes only. No copyright or license is extended to users.

Copyright Applied AI Ltd 2016


Development

Git clone the repo to your workspace.

e.g. in Mac OSX terminal:

    $> git clone https://github.com/jonsedar/pymc3_vs_pystan.git
    $> cd pymc3_vs_pystan

NOTES:

  • This project uses Python 3.5, and was developed on a Macbook Pro OSX 10.10.5 using the Anaconda distro with a new virtualenv on 19 April 2016
  • The project requires PyMC3 (with an associated Theano install) and PyStan (with an associated Stan install) so is quite heavy.
  • Specific versions of key packages for clarity: pymc3-3.0, theano-0.8.1, pystan-2.9.0.0

Setup a virtual environment for Python libraries

  1. Using create a new virtualenv, installing packages from env YAML file:

     $> conda env create --file conda_env_pymc3_vs_pystan.yml
     $> source activate pymc3_vs_pystan
    
  2. install remaining packages via pip (inc pymc3 master with deps):

     $> ./pip_install.sh
    
  3. Launch Jupyter Notebook server

     $> jupyter notebook
    

Data

Local data is not stored in the repo, and should be manually copied into the subdirectory data/

See file data/README_DATA.md for more info


General Notes:

File hack_findmap.py contains a customised find_MAP() function to correct for pymc3's default behaviour of computing gradients when the chosen optimizer doesn't use them. We don't want to compute gradients in large datasets because it's quite computationally expensive.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].