CRPS
Continuous Ranked Probability Score using discrete quantiles. Approximates CRPS by averaging the pinball loss across quantile levels.Ground-truth array with shape
(num_seq, n_var, seq_len)num_seq: Number of sequencesn_var: Number of variables/featuresseq_len: Length of the sequence
Predicted quantiles with shape
(q, num_seq, n_var, seq_len)q: Number of quantiles- Must match dimensions of
y_trueexcept for the first dimension
Array of quantile levels with shape
(q,). Values should be between 0 and 1 (e.g., [0.1, 0.5, 0.9] for 10th, 50th, and 90th percentiles)Approximated CRPS (mean pinball loss over quantiles)
Example
MWSQ
Mean weighted squared quantile loss. Computes a squared pinball loss across quantile forecasts.Ground-truth array with shape
(num_seq, n_var, seq_len)num_seq: Number of sequencesn_var: Number of variables/featuresseq_len: Length of the sequence
Predicted quantiles with shape
(q, num_seq, n_var, seq_len)q: Number of quantiles- Must match dimensions of
y_trueexcept for the first dimension
Array of quantile levels with shape
(q,). Values should be between 0 and 1Mean squared pinball loss across quantiles and sequences
Example
MSIS
Mean scaled interval score. Computes a simple interval scoring metric using empirical percentiles of the ground-truth data.Ground-truth array
Predicted values or interval endpoints
Significance level for the central prediction interval. Default
0.05 corresponds to a 95% confidence interval0.05: 95% interval (5% in each tail)0.10: 90% interval (10% in each tail)0.01: 99% interval (1% in each tail)
MSIS score
Example
Usage Notes
Quantile Format
All probabilistic metrics expect quantiles to be provided as a 1D array of values between 0 and 1. Common quantile configurations:Shape Requirements
For CRPS and MWSQ:y_trueshape:(num_seq, n_var, seq_len)y_predshape:(q, num_seq, n_var, seq_len)quantilesshape:(q,)
y_pred must match the length of quantiles.