Commit 6046f59
committed
Add concentration-space LOO and plotting tools
Introduce a full concentration-space LOO workflow and visualization support.
- Add catalax.mcmc.loo: reconstruction of per-draw concentration log-likelihoods for mechanistic and surrogate (rate-based) fits, build_loo_idata, loo(), loo_pointwise(), compare(), and consistency_check(); supports Euler integration variants and options for using measurement errors or reusing sampled noise.
- Export LOO functions and new plotting hooks (plot_loo_influence, plot_loo_heatmap) from catalax.mcmc.__init__.
- Add plotting utilities in catalax.mcmc.plotting for visualizing per-point Pareto-k / elpd influence and heatmaps, plus related helpers and color scales.
- Add convenience methods on HMCResults (loo, compare, loo_pointwise, loo_consistency_check, plot_loo_influence) to call the new LOO API.
- Fix likelihood/discrepancy handling in BayesianModel (use HalfNormal prior for sigma and treat sigma_total as sampled sigma rather than sigma**2) to align noise semantics with reconstruction.
These changes enable consistent LOO comparison across mechanistic and surrogate-mode fits and provide plotting helpers to inspect high-influence observations.1 parent 4ff4e6c commit 6046f59
5 files changed
Lines changed: 1382 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
3 | 20 | | |
4 | 21 | | |
5 | 22 | | |
| |||
35 | 52 | | |
36 | 53 | | |
37 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
38 | 64 | | |
0 commit comments