monte carlo expriment
Switch branches/tags
Nothing to show
Pull request Compare This branch is 136 commits behind jsalvatier:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Monte-Carlo Experiment

MCEx is an experimental package designed to be allow experimentation with MCMC package design. It's goal is to be simple to use, understand, extend and improve, while still being fast. The hope is that some of the lessons learned in this experimental package lead to improvements in PyMC. People are encouraged to fork MCEx to try out their own designs and improvements.

  • Some design decision: computational core is outsourced to Theano.
  • Free variables separate from prior distributions. This means all variables are like Potentials. Prior distributions must be added explicitly. Say you want to fit a model like f(x,a,b) ~ Norm(0,1) where x is your data and f is a transformation that depends on parameters a and b. It is not straightforward to fit this in PyMC, but it is in MCEx.
  • Free variables, chains, chain history, and the model are all very distinct objects
  • Objects are constructed more explicitly by the user
Design feature Advantages Disadvantages
Computational core outsourced to Theano
  • simple package code
  • efficient
  • improvements to Theano improve MCEx
  • supporting arbitrary stochastics/deterministics more difficult in complex cases
Free variables separate from prior distributions
  • obvious how to apply unknown transformations to the data
  • represents computational graph closely
  • more verbose
free variables, chains, chain history, and model all distinct
  • easy to understand design
  • hopefully robust
chain and chain history are distinct
  • allows easier restarting of chains and other manipulation of chains separate from the history
objects constructed explicitly by user
  • more obvious to user how package works
  • more verbose

Future improvements

  • The design of the Model and Evaluation should be better. The goal is to handle the fact that different step methods should be able to have different evaluation procedures but still have them organized in an intelligent way. There should be some kind of top level 'complete' model, but step methods should be able to get some kind of 'view' on a model that can have specialized interaction and evaluation.
  • The use of VariableMapping (which encapsulate a mapping between values of free variables and a vector) could use more thought. The goal is to make its use simple, obvious and non-awkward.
  • May be possible to create a coherent framework for sampling and doing things like finding the MAP (right now these are special functions).