Open orlox opened 1 week ago
As a starting point, if we consider all the elements of KickMCMCResults:
@kwdef mutable struct KickMCMCResults
mcmc_model_cauchy
mcmc_model_normal
observations::Observations
results::Dict{Symbol, Matrix{Float64}}
chains
nuts_warmup_count::Int
nuts_acceptance_rate::Float64
nsamples::Int
end
Main critical thing is saving the results. We should anyhow save everything, as it documents what was done more precisely (and from the chains object one can get important metrics regarding convergence). But the rest can be done later. I did write up some code to save chains a while back but that has been lost to the aether now.
One additional thing we need is the capacity to save results in a machine readable way. It would be ideal if an entire instance of
KickMCMCResults
could be saved in hdf5. Running the MCMC and analyzing it should be two different steps, so we can in principle just throw a large MCMC at a node in a cluster and then carefully analyze the outcome. We can also analyze more than one chain in the same session this way, without needing to run them there.Here is a simple example that creates an HDF5 file with one dataset, storing a matrix and a set of column names: