Saving

This module gives a single function for saving the results of an MCMC run. Everything gets saved in a .hdf5 file using h5py.

saving.save_mcmc(mcmc, params, outpath, filename='outputs', **kwargs)

Saves the MCMC run in a .hd5f file. Any variable defined by a mcmc.PxMCMC instance’s tracking option will be saved as a dataset. Runtime parameters and other things that the user may wish to save are saved as attributes.

Parameters
  • mcmc – type mcmc.PxMCMC after its run() has been called.

  • params – type mcmc.PxMCMCParams used to setup the mcmc instance.

  • outpath (string) – directory in which file should be saved.

  • filename (string) – filename without extension.

  • **kwargs – additional bits users want to save.