mcmc-0.2.2: Sample from a posterior using Markov chain Monte Carlo

Copyright(c) Dominik Schrempf 2020
LicenseGPL-3.0-or-later
Maintainerdominik.schrempf@gmail.com
Stabilityunstable
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Mcmc.Save

Description

Creation date: Tue Jun 16 10:18:54 2020.

Save and load an MCMC run. It is easy to save and restore the current state and likelihood (or the trace), but it is not feasible to store all the proposals and so on, so they have to be provided again when continuing a run.

Synopsis

Documentation

saveStatus :: ToJSON a => FilePath -> Status a -> IO () Source #

Save a Status to file.

Saved information: - state - iteration - trace - acceptance ratios - generator

Important information that cannot be saved and has to be provided again when a chain is restored: - prior function - likelihood function - cycle - monitor

loadStatus :: FromJSON a => (a -> Log Double) -> (a -> Log Double) -> Cycle a -> Monitor a -> FilePath -> IO (Status a) Source #

Load a Status from file.

Important information that cannot be saved and has to be provided again when a chain is restored: - prior function - likelihood function - cycle - monitor

To avoid incomplete continued runs, the mcmc file is removed after load.