Discrete Prior Selection #906
-
Can we use discrete priors as proposal density? I am having an error when i use bernoulli distribution as proposal priors. Any idea regarding this would be helpful. P.S. I am new to the theory simulation based inference and this sbi package. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi there, generally, As a workaround, you can simply use a continuous density estimator and get the best-possible continuous approximation to the discrete posterior. When doing this, do not pass the inference = SNPE(density_estimator="nsf") # Do not pass prior
_ = inference.append_simulations(theta, x).train()
posterior = inference.build_posterior() |
Beta Was this translation helpful? Give feedback.
Hi there,
generally,
sbi
does not yet support discrete density estimators (and thereby also no discrete priors).As a workaround, you can simply use a continuous density estimator and get the best-possible continuous approximation to the discrete posterior. When doing this, do not pass the
prior
at initialization (see below). Also, I would recommend to use an NSF as density estimator for this: