Download PyMC: Bayesian Stochastic Modelling in Python
Transcript
6 PyMC: Bayesian Stochastic Modelling in Python 2.6. Running the test suite PyMC comes with a set of tests that verify that the critical components of the code work as expected. To run these tests, users must have nose installed. The tests are launched from a Python shell: import pymc pymc.test() In case of failures, messages detailing the nature of these failures will appear. 2.7. Bugs and feature requests Report problems with the installation, test failures, bugs in the code or feature request on the issue tracker at http://code.google.com/p/pymc/issues/list, specifying the version you are using and the environment. Comments and questions are welcome and should be addressed to PyMC’s mailing list at pymc@googlegroups.com. 3. Tutorial This tutorial will guide you through a typical PyMC application. Familiarity with Python is assumed, so if you are new to Python, books such as Lutz (2007) or Langtangen (2009) are the place to start. Plenty of online documentation can also be found on the Python documentation page at http://www.python.org/doc/. 3.1. An example statistical model Consider a sample dataset consisting of a time series of recorded coal mining disasters in the UK from 1851 to 1962 (Figure 1, Jarrett 1979). Occurrences of disasters in the series is 6 number of disasters 5 4 3 2 1 0 1860 1880 1900 year 1920 1940 Figure 1: Recorded coal mining disasters in the UK. 1960