Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

elementary_score

Elementary Scoring Function for Expectiles and Quantiles


Description

Weighted average of the elementary scoring function for expectiles resp. quantiles at level alpha with parameter theta, see reference below. Every choice of theta gives a scoring function consistent for the expectile resp. quantile at level alpha. Note that the expectile at level alpha = 0.5 is the expectation (mean). The smaller the score, the better.

Usage

elementary_score_expectile(
  actual,
  predicted,
  w = NULL,
  alpha = 0.5,
  theta = 0,
  ...
)

elementary_score_quantile(
  actual,
  predicted,
  w = NULL,
  alpha = 0.5,
  theta = 0,
  ...
)

Arguments

actual

Observed values.

predicted

Predicted values.

w

Optional case weights.

alpha

Optional level of expectile resp. quantile.

theta

Optional parameter.

...

Further arguments passed to weighted_mean.

Value

A numeric vector of length one.

References

Ehm, W., Gneiting, T., Jordan, A. and Krüger, F. (2016), Of quantiles and expectiles: consistent scoring functions, Choquet representations and forecast rankings. J. R. Stat. Soc. B, 78: 505-562, <doi.org/10.1111/rssb.12154>.

Examples

elementary_score_expectile(1:10, c(1:9, 12), alpha = 0.5, theta = 11)
elementary_score_expectile(1:10, c(1:9, 12), alpha = 0.5, theta = 11, w = rep(1, 10))
elementary_score_quantile(1:10, c(1:9, 12), alpha = 0.5, theta = 11, w = rep(1, 10))

MetricsWeighted

Weighted Metrics, Scoring Functions and Performance Measures for Machine Learning

v0.5.2
GPL (>= 2)
Authors
Michael Mayer [aut, cre, cph], Christian Lorentzen [ctb, rev]
Initial release
2021-04-16

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.