SBC implementations #31
Replies: 3 comments 7 replies
-
Thanks, it is encouraging to see this kind of work. From the perspective of stantargets, I think the most expedient backup is just to manually compare the actual draws to .join_data to get the rank statistics. The actual calculation is trivially easy, but I hesitate because it would require new target factories for MCMC and VB, which sets a dangerous precedent for when many more alternative validation methods emerge. |
Beta Was this translation helpful? Give feedback.
-
Note I worked up an SBC demo using targets here: https://github.com/mike-lawrence/sbc_demo Possibly of interest for stantargets is how I stored the true parameters and then compute the ranks, plus added diagnostics. For those see "r_helpers/generate_true_and_data.r" and "r_helpers/sample_and_summarise.r" |
Beta Was this translation helpful? Give feedback.
-
Oh, I just found this discussion via stan-dev/posterior#111 - was thinking on whether integrating the SBC package (as linked by @mike-lawrence, https://github.com/hyunjimoon/SBC/) with (stan)targets would be sensible. Would be happy to hear your thoughts... Since this discussion was opened, the package was almost completely rewritten and would probably now be much easier to integrate with To summarise:
The package aims to support also non-Stan models (currently only JAGS is built-in) and also supports both optimizing and VB fits in Stan (either via Currently we use The reason I care about compilation is that I want to use the SBC package to throughout model development and early in the workflow, when one runs just a couple simulations to see if stuff is at least roughly OK, compilation times can be a substantial drag, so not repeating compilation when not absolutely needed seems important. We also have a different approach to draws. In the SBC package, whole fits (and thus all draws) + all of stdout/messages/warnings/errors are kept by default (but there is an option to not transfer the fit from workers). The reason is once again workflow - I want to have the ability to investigate the fits and better understand where any problems arise (see e.g. https://hyunjimoon.github.io/SBC/articles/small_model_workflow.html for a workflow as I use it currently, where inspecting the fits is relevant). A possible alternative is to store the fits on disk and keep the ability to retrieve them on-demand, but not actually transfer them... |
Beta Was this translation helpful? Give feedback.
-
@wlandau I see you've already proposed modifications to the posterior package to facilitate SBC, but I thought I'd point out this alternative (though admittedly less "official") implementation as possibly of interest.
Beta Was this translation helpful? Give feedback.
All reactions