crps_sample: Ranked Probability Score

View source: R/scoringRules_wrappers.R

crps_sampleR Documentation

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_sample(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. Alternatively, predictions can just be a vector of size n.

Value

vector with the scoring values

References

Alexander Jordan, Fabian Krüger, Sebastian Lerch, Evaluating Probabilistic Forecasts with scoringRules, https://www.jstatsoft.org/article/view/v090i12

Examples

true_values <- rpois(30, lambda = 1:30)
predictions <- replicate(200, rpois(n = 30, lambda = 1:30))
crps_sample(true_values, predictions)

scoringutils documentation built on Feb. 16, 2023, 7:30 p.m.