Role of prior distribution in single round NPE SBI #1603
-
Beta Was this translation helpful? Give feedback.
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! |
Beta Was this translation helpful? Give feedback.
Hi there,
for single-round
SNPE
(ie if you do not run a for-loop as shown here), theprior
is 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 aUniform
prior, 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