Skip to content

GunioRobot/mcex

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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).

About

monte carlo expriment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%