PyMC
From charlesreid1
Python package for performing Monte Carlo simulations.
PyMC3 is the newest and preferred version of the software.
Contents
Installing
Pip
PyMC3 can be installed with pip:
pip3 install pymc3
The prerequisites are:
Optional prerequisites:
- GPflow
- Patsy
- scikit-learn (specifically, scikits.sparse)
Quick Start
Importing Components
The quick start guide is here: http://docs.pymc.io/notebooks/api_quickstart.html
It starts by importing the necessary components:
%matplotlib inline import numpy as np import theano.tensor as tt import pymc3 as pm import seaborn as sns import matplotlib.pyplot as plt sns.set_context('notebook')
PyMC3 and Keras
To have PyMC3 and Keras work together for a convolutional autoencoder: http://docs.pymc.io/notebooks/convolutional_vae_keras_advi.html
This utilizes the Theano backend for Keras
Resources
Github: PyMC3 repository
- https://github.com/pymc-devs/pymc3
- Official documentation: http://docs.pymc.io/
Book: Bayesian Methods for Hackers by Cam Davidson
- https://github.com/CamDavidsonPilon/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers
- Illustrates how to do Bayesian statistics using PyMC (the brute-force computational approach, rather than the math-heavy approach)
Book: Doing Bayesian Data Analysis by John Kruschke
- https://github.com/aloctavodia/Doing_bayesian_data_analysis
- doingbayesiandataanalysis.blogspot.com.ar
- Originally written for BUGS and R, ported to PyMC3
iPython Notebook: Doing Bayesian Data Analysis
- doingbayesiandataanalysis.blogspot.com.ar
- author: https://github.com/hgbrian