From charlesreid1

Python package for performing Monte Carlo simulations.

PyMC3 is the newest and preferred version of the software.

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

Book: Bayesian Methods for Hackers by Cam Davidson

Book: Doing Bayesian Data Analysis by John Kruschke

iPython Notebook: Doing Bayesian Data Analysis

Flags