Simulation-based inference toolkit
num_bins
when using nsf
as density estimator (#465)torch
v1.8.0
(#469)minimal.py
(thanks @psteinb, #485)pyknos
v0.14.2
torch.data.DataLoader
kwargs to all inference methods (thanks @narendramukherjee, #445)torch
v1.8.0
(#451)leakage_correction
parameters for log_prob
correction in unnormalized
posteriors (thanks @famura, #454)pairplot()
, conditional_pairplot()
, and conditional_corrcoeff()
should now be imported from sbi.analysis
instead of sbi.utils
(#394).fig_size
to figsize
in pairplot (#394).user_input_checks
to sbi.utils
(#430).joblib=1.0.0
and fix progress bar updates for multiprocessing (#421).SNRE
(thanks @adittmann, #425).sbi v0.15.0
(#427, thanks @psteinb).nflows
(#331)from sbi.inference import SNPE, prepare_for_sbi
simulator, prior = prepare_for_sbi(simulator, prior)
inference = SNPE(simulator, prior)
# Simulate, train, and build posterior.
posterior = inference(num_simulation=1000)
New syntax:
from sbi.inference import SNPE, prepare_for_sbi, simulate_for_sbi
simulator, prior = prepare_for_sbi(simulator, prior)
inference = SNPE(prior)
theta, x = simulate_for_sbi(simulator, proposal=prior, num_simulations=1000)
density_estimator = inference.append_simulations(theta, x).train()
posterior = inference.build_posterior(density_estimator) # MCMC kwargs go here.
More information can be found here here.
infer
(thanks @glouppe, #370)RestrictionEstimator
to learn regions of bad simulation outputs (#390)