Description Usage Arguments Details Value Note Author(s) References Examples
The continuous ranked probability score (CRPS) is intended to verify a probabilistic prediction, i.e. a prediction in the form of a probability distribution. Informally, it judges how close this distribution envelops the verifying observation.
1 | getCrps(cdfx, cdfy, obs)
|
cdfx |
numeric vector. The quantiles belonging to the
probabilities defined in |
cdfy |
numeric vector. The probabilities belonging to the
quantiles defined in |
obs |
real number. The value of the observation corresponding to the probabilistic prediction. |
cdfx
can have a variable step width.
Real number, i.e. the CRPS value.
The step width in cdfx
should be small enough such that
a linear approximation between the points is reasonable.
Step functions (i.e. deterministic predictions with the entire probability mass at a single value) should be avoided since the numerical integration fails (see the 'Examples' below).
Simon S
Hersbach, H. (2000). "Decomposition of the continuous ranked probability score for ensemble prediction systems". Weather and Forecasting.
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## normal distribution
obs <- 0
cdfx <- seq(from=-5,to=5,by=0.01)
cdfy <- pnorm(q=cdfx)
getCrps(cdfx=cdfx,cdfy=cdfy,obs=obs)
## 'deterministic' prediction:
## in theory we should end up with the mean absolute error
## however, the numerical integration of the step function fails
obs <- 0
cdfx <- c(-3,-1,-1,2)
cdfy <- c(0,0,1,1)
getCrps(cdfx=cdfx,cdfy=cdfy,obs=obs)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.