Repository navigation
Role of prior distribution in single round NPE SBI #1603
Answered
by
michaeldeistler
ericlizalde
asked this question in
Q&A
Answered by
michaeldeistler
May 23, 2025
Replies: 1 comment 2 replies
|
Hi there, for single-round Aside: You do not have to pass the prior at all (if you do not want to the feature of automatically rejecting posterior samples): inference = SNPE(density_estimator=density_estimator_build_fn)
...Hope this helps! |
2 replies
Answer selected by
ericlizalde
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


Hi there,
for single-round
SNPE(ie if you do not run a for-loop as shown here), theprioris almost not used. It is only used to reject posterior samples that are outside of the support of the prior. In your case, the prior isNormal, so it has support on the entire real line, and the prior is completely unused. In your other example, you use aUniformprior, so it does reject some posterior samples (those outside of [0, 180]).Aside: You do not have to pass the prior at all (if you do not want to the feature of automatically rejecting posterior samples):
Hope this helps!
Michael