Learn R Programming

scoringutils (version 0.1.4)

crps: Ranked Probability Score

Description

Wrapper around the crps_sample function from the scoringRules package. Can be used for continuous as well as integer valued forecasts

Usage

crps(true_values, predictions)

Arguments

true_values

A vector with the true observed values of size n

predictions

nxN matrix of predictive samples, n (number of rows) being the number of data points and N (number of columns) the number of Monte Carlo samples

Value

vector with the scoring values

References

Alexander Jordan, Fabian Kr<U+00FC>ger, Sebastian Lerch, Evaluating Probabilistic Forecasts withscoringRules, https://arxiv.org/pdf/1709.04743.pdf

Examples

Run this code
# NOT RUN {
true_values <- rpois(30, lambda = 1:30)
predictions <- replicate(200, rpois(n = 30, lambda = 1:30))
crps(true_values, predictions)
# }

Run the code above in your browser using DataLab