Skip to content
Discussion options

You must be logged in to vote

Hello @ali-akhavan89

It looks like your posterior is so concentrated that the default rejection sampling struggles to find valid samples strictly within the prior bounds. Since the network learned "too well," it might be placing the peak probability mass just on the edge or slightly outside your prior (leakage).
You may solve this by disabling the rejection check using the reject_outside_prior argument, which was recently added to sbi (#1705) designed for this situation

# Disable the rejection loop to avoid the 0% acceptance warning
samples = posterior.sample((10000,), reject_outside_prior=False)

This allows the flow to return samples instantly, but they might be slightly outside the prio…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@janfb
Comment options

@ali-akhavan89
Comment options

Answer selected by janfb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants