Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #49 +/- ##
=======================================
Coverage ? 96.19%
=======================================
Files ? 3
Lines ? 342
Branches ? 0
=======================================
Hits ? 329
Misses ? 13
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I have not checked the code yet. But notice that to treat the posterior as the prior, we can not simply plug the posterior "into the prior", because we don't usually have conjugate models. So in the paper they discuss the notion of augmented posterior, they concatenate observations to synthetic/replicated data. In the github repo there are a couple of examples in R (Stan) and python (bayesflow). https://github.com/TeemuSailynoja/posterior-sbc/tree/main/hierarchical-model |
|
I see, that's definitely not what I did. I will mark it as draft and rethink it. |
simuk/sbc.py
Outdated
| sample_dims=["sample"], | ||
| coords={**prior.coords}, | ||
| ) | ||
| prior_pred = extract(idata, group="posterior_predictive", keep_dataset=True) |
There was a problem hiding this comment.
I think here you have the missing step, i.e., concatenating the observations.
|
Hi @aloctavodia , I’ve managed to produce these augmented_datasets, but I’m not sure how to actually fit these models conditioning on new data that has a different shape (twice the number of observations). The current version uses
Is there a (better) third option? |
|
|
|
Hey @currocam, just checking the status of this PR. Are you still working on this? Would you like some help? |
|
Hi, |
|
I will try to help with this in the next two weeks. |
Description
This PR adds support for
posterior SBCby adding an optionaltraceargument. It closes #12.My understanding is that, roughly, posterior SBC simply means treating the posterior distribution as the new prior, so most code should be the same (and it would make sense to put everything in the same
SBCclass). However, I don't know if I like the API.Edit: I just realized I messed up the commit history between branches of this and the other active PR.
Checklist