File Exchange

image thumbnail

Continuous rank probability score

version 1.0.0.0 (6.73 KB) by Durga Lal Shrestha
Calculates continuous rank probability score (CRPS) for probabilistic and ensemble forecasts

9 Downloads

Updated 11 Sep 2014

View License

The CRPS measures the closeness of forecast distribution (fcst) and corresponding observation (obs). This score is widely used in forecast verification.

[mean_CRPS] = crps(fcst,obs);
[mean_CRPS] = crps(fcst,obs,plot_pos);
[mean_CRPS,crps_values,num] = crps(fcst,obs);

INPUT
obs: Vector of observations
fcst: Matrix of Ensemble forecast of size N x M. NB: N must equal length(obs), M equals the number of ensemble members
plot_pos: plotting positions that determine cumulative distribution function

OUTPUT
mean_CRPS: Mean of non missing CRPS values
crps_values: A vector (length n) of CRPS values
num: number of non missing CRPS values used to compute mean_CRPS

EXAMPLES:
fcst = rand(1000,1000);
obs = rand(1000,1);
[meanCRPS] = crps(fcst,obs);

Cite As

Durga Lal Shrestha (2021). Continuous rank probability score (https://www.mathworks.com/matlabcentral/fileexchange/47807-continuous-rank-probability-score), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (1)

Walter Acevedo

Hello! I would like to know for what reason are negatives values treated as missing values?

MATLAB Release Compatibility
Created with R2014a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!