## Continuous rank probability score

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

Updated 11 Sep 2014

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 .

##### MATLAB Release Compatibility
Created with R2014a
Compatible with any release
##### Platform Compatibility
Windows macOS Linux
{"ft_lang_label":"__label__en","ft_lang_prob":0.71045786,"math_prob":0.9594956,"size":1332,"snap":"2021-43-2021-49","text_gpt3_token_len":327,"char_repetition_ratio":0.100903615,"word_repetition_ratio":0.011904762,"special_character_ratio":0.22297297,"punctuation_ratio":0.16883117,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.993946,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-10-22T12:57:17Z\",\"WARC-Record-ID\":\"<urn:uuid:b5fb1b60-7f5d-42d5-95ec-7b0bf564634d>\",\"Content-Length\":\"73350\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:14428747-30f7-4f9d-a545-82b7a93d751c>\",\"WARC-Concurrent-To\":\"<urn:uuid:b5991c69-e9f6-440a-9252-5244d8be8dcd>\",\"WARC-IP-Address\":\"104.117.0.182\",\"WARC-Target-URI\":\"https://au.mathworks.com/matlabcentral/fileexchange/47807-continuous-rank-probability-score\",\"WARC-Payload-Digest\":\"sha1:EYHOUP6SXIW2BCBAQCVECPOVFKQPYYGB\",\"WARC-Block-Digest\":\"sha1:CRCCJZ6WQUMIK6FN7WVMWHZYXTUZ4EQT\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-43/CC-MAIN-2021-43_segments_1634323585507.26_warc_CC-MAIN-20211022114748-20211022144748-00153.warc.gz\"}"}