Computes the continuous ranked probability score (CRPS), a prediction-interval coverage probability (PICP) at each requested nominal level, the mean prediction-interval width (MPIW) at the same levels, and a ready-for-ggplot reliability data frame.
Usage
uncertainty_calibrate(post, truth, probs = seq(0.05, 0.95, by = 0.05))Value
A list with:
- crps
Mean sample-based CRPS across query cells.
- picp
Named vector of empirical coverage, one per
probs.- mpiw
Named vector of mean interval widths, one per
probs.- reliability_df
Data frame with columns
nominal,empirical,diffsuitable forggplot2::geom_line.- point_rmse
Root-mean-squared error of the posterior mean against the truth.
Details
The CRPS for a sample-based posterior F and a scalar truth y
is computed from the Monte-Carlo formula
\(
\mathrm{CRPS}(F, y) = \tfrac{1}{N}\sum_i |s_i - y|
- \tfrac{1}{2N^2}\sum_{i,j} |s_i - s_j|
\)
(see Gneiting & Raftery 2007 for the derivation and its strictly
proper scoring rule interpretation). The per-query CRPS is
averaged across all query cells for a single reported scalar.
