Closed andymiller closed 6 years ago
Hi @andy Will you rebase on master, or merge master into mcmc-inference again? Looks like a lot of stuff ended up in this PR that was in previous merges. (The first commit here is from 11 months ago).
process_source_mcmc
looks good. It's hard to parse the rest because there's a lot in the diff that I think was already committed. Everything through removed stale NPZ reference
was part of PR #681
added support for MCMC inference
mcmc/mcmc_infer.jl
)process_source_mcmc
function inParallelRun.jl
; added a booleando_vi
flag toone_node_single_infer
(defaults to VI)The following call should return a list of
res
objects (dictionaries)each object is a dictionary, with the following entries
star_samples
andgal_samples
: dataframe of parameter samplesstar_lls
andgal_lls
: log joint probability for the star or galaxy samplesave_pstar
: average log probability that the source is a starstar_bootstrap
,gal_bootstrap
: bootstrap samples of the marginal likelihood of the data under the star model and the gal model, respectively (these are used to compute the posterior prob(star | data)).The list of dictionaries above can be consolidated into a one-source-per-row dataframe with approximate posterior means and stderr values with the following call
Here,
star_summary
assumes all sources are stars,gal_summary
assumes all sources are galaxies, andjoint_summary
presents star posterior inferences ifexp(ave_pstar) > .5
, and galaxy posterior inferences otherwise.Closes #387 . Closes #714 . Closes #365 .