How to choose neural nets#
sbi implements a wide range of neural networks for the different inference methods. By and large, we expect that the default choices of sbi perform well. This tutorial describes how you can optimize the performance of sbi by choosing the best neural net.
Explicit recommendations#
When your simulation outputs are high-dimensional (e.g., images, time-series,…), we strongly recommend using an embedding net, as described here.
For
NPEandNLE, thensfdensity estimator often outperforms the default (maf), but it is slower to train and may be more prone to overfitting. This can be done by settingtrainer = NPE(density_estimator="nsf").For best performance, optimize the hyperparameters of
sbi.