Skip to content

Commit

Permalink
Fix bug in importance sampled posterior (#1081)
Browse files Browse the repository at this point in the history
* Added theory section for importance sampling tutorial.

* Added manual importance sampling to tutorial.

* Finished importance sampling tutorial.

* Fixed bug in sir, where the oversampling_rate would not be passed to the sir function.
  • Loading branch information
max-dax authored Apr 2, 2024
1 parent b074c66 commit d3b458b
Show file tree
Hide file tree
Showing 2 changed files with 24,253 additions and 1 deletion.
2 changes: 1 addition & 1 deletion sbi/inference/posteriors/importance_posterior.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ def _sir_sample(
self.potential_fn,
proposal=self.proposal,
num_samples=num_samples,
oversampling_factor=oversampling_factor,
num_candidate_samples=oversampling_factor,
show_progress_bars=show_progress_bars,
max_sampling_batch_size=max_sampling_batch_size,
device=self._device,
Expand Down
24,252 changes: 24,252 additions & 0 deletions tutorials/17_importance_sampled_posteriors.ipynb

Large diffs are not rendered by default.

0 comments on commit d3b458b

Please sign in to comment.