You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The amortizer knows how to combine its losses and you can inspect the summary space for outliers during inference.
171
173
172
174
### References and Further Reading
173
175
@@ -177,7 +179,74 @@ preprint</em>, available for free at: https://arxiv.org/abs/2112.08866
177
179
178
180
## Model Comparison
179
181
180
-
Example coming soon...
182
+
BayesFlow can not only be used for parameter estimation, but also to perform approximate Bayesian model comparison via posterior model probabilities or Bayes factors.
183
+
Let's extend the minimal example from before with a second model $M_2$ that we want to compare with our original model $M_1$:
For the purpose of this illustration, the two toy models only differ with respect to their prior specification ($M_1: \mu = 0, M_2: \mu = 2$). We create both models as before and use a `MultiGenerativeModel` wrapper to combine them in a `meta_model`:
Our approximator shows excellent calibration, with the calibration curve being closely aligned to the diagonal, an expected calibration error (ECE) near 0 and most predicted probabilities being certain of the model underlying a data set. We can further assess patterns of misclassification with a confusion matrix:
For the vast majority of simulated data sets, the "true" data-generating model is correctly identified. With these diagnostic results backing us up, we can proceed and apply our trained network to empirical data.
248
+
249
+
BayesFlow is also able to conduct model comparison for hierarchical models. See this [tutorial notebook](docs/source/tutorial_notebooks/Hierarchical_Model_Comparison_MPT.ipynb) for an introduction to the associated workflow.
181
250
182
251
### References and Further Reading
183
252
@@ -190,6 +259,10 @@ doi:10.1109/TNNLS.2021.3124052 available for free at: https://arxiv.org/abs/2004
190
259
Bayesian Model Comparison. <em>ArXiv preprint</em>, available for free at:
191
260
https://arxiv.org/abs/2210.07278
192
261
262
+
- Elsemüller, L., Schnuerch, M., Bürkner, P. C., & Radev, S. T. (2023). A Deep
263
+
Learning Method for Comparing Bayesian Hierarchical Models. <em>ArXiv preprint</em>,
264
+
available for free at: https://arxiv.org/abs/2301.11873
0 commit comments