spux

SPUX: Scalable Package for Uncertainty Quantification


Keywords
Bayesian, inference, using, hpc
License
Apache-2.0
Install
pip install spux==0.4.0

Documentation

spux

Documentation Status

SPUX: Scalable Particle Markov Chain Monte Carlo

Installation

Packages

We recommend using Python 3.

Main prerequisites

  • Open MPI:
    • in OS X with Homebrew, in terminal: brew open-mpi
    • in Debian/Linux with Apt, in terminal: apt-get install openmpi-bin libopenmpi-dev

Packages

We recommend using Python 3.

  • in terminal: pip3 install --user --upgrade pip
  • in terminal: pip3 install --user -r requirements.txt

Optional prerequisites

Packages

We recommend using Python 3.

  • in terminal: pip3 install --user acor

Additional prerequisites for specific model drivers

  • (Python 3 only) Java, and in terminal: pip3 install --user JPype1-py3

Editor

Vim. If not satisfied with this suggestion, then we recommend using editor Spyder, which has similar UI as R. A cross-platform free but proprietary options are PyCharm and VS Code.

Examples

Commands should be executed in Python terminal, or inside Python script. To learn how to write your own custom scripts, look into corresponding Python files.

RandomWalk

Single run

from spux.models import randomwalk
randomwalk.test ()

MCMC inference

Currently parallel version only. Execution using script (here named script.py):

mpirun -n 1 python3 script.py

Inside script.py :

from spux.samplers import mcmc
mcmc.test_RandomWalk ()

Individual based model

Java IBM installation is needed [link?]. The path to the project directory needs to be specified.

Single run

from spux.models import ibm
ibm.test (path = '/path/to/IBMProj/')

MCMC inference (not yet implemented)

Currently parallel version only. Execution using script (here named code:script.py):

mpirun -n 1 python3 script.py

Inside script.py :

from spux.samplers import mcmc
mcmc.test_IBM (path = '/path/to/IBMProj/')

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.