Software

We construct our probability models and MCMC algorithms using PyMC, and in particular its Gaussian process module. PyMC's examples directory contains a basic example.

Each analysis brings unique modeling and data challenges, requiring time-consuming testing and updating as new data become available. We have developed a wrapper for PyMC, called generic-mbg, that allows MAP's statisticians to transfer control of the analysis to project leaders after model development is complete. Generic-mbg provides shell scripts for Unix-like systems that perform common operations on particular models and datasets. For example,

mbg-infer mbgw tracefile.hdf5 dataset.csv

does MCMC inference on the model defined in the Python module `mbgw`, using the jumping strategy specified in the same module, with the dataset `dataset.csv`, and writes the dynamic trace into the HDF5 archive `tracefile.hdf5`. Later,

mbg-map mbgw tracefile.hdf5 1000 mask

takes the MCMC trace stored in `tracefile.hdf5`, discards 1000 iterations as burnin, and maps the predictive quantities specified in `mbgw` on the pixels in the GIS raster `mask`, which may be in ESRI ascii (`mask.asc`) or float (`mask.flt` and `mask.hdr`) format, or MAP's internal HDF5 format for raster data.

For more information on these shell commands, as well as `mbg-validate`, `mbg-areal-predict`, `mbg-evaluate-survey` and others, see the README. For examples of Python modules that define models, jumping strategies, predictive quantities, etc see MAP's code repository.