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.
Some important values have to be provided upon restoring the status. See
loadStatus
.
:: FromJSON a | |
=> (a -> Log Double) | Prior function. |
-> (a -> Log Double) | Likelihood function. |
-> Cycle a | |
-> Monitor a | |
-> Maybe (Cleaner a) | Cleaner, if needed. |
-> FilePath | Path of status to load. |
-> IO (Status a) |
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 - cleaning function - cycle - monitor
To avoid incomplete continued runs, the .mcmc
file is removed after load.