Copyright | (c) Dominik Schrempf 2020 |
---|---|
License | GPL-3.0-or-later |
Maintainer | dominik.schrempf@gmail.com |
Stability | unstable |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
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.
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.