aerr_sf | R Documentation |
The function aerr_sf computes the absolute error scoring function when y
materialises and x
is the predictive median functional.
The absolute error scoring function is defined in Table 1 in Gneiting (2011).
aerr_sf(x, y)
x |
Predictive median functional (prediction). It can be a vector of length
|
y |
Realisation (true value) of process. It can be a vector of length
|
The absolute error scoring function is defined by:
S(x, y) := |x - y|
Domain of function:
x \in \mathbb{R}
y \in \mathbb{R}
Range of function:
S(x, y) \geq 0, \forall x, y \in \mathbb{R}
Vector of absolute errors.
For details on the absolute error scoring function, see Gneiting (2011).
The median functional is the median of the probability distribution F
of
y
(Gneiting 2011).
The absolute error scoring function is negatively oriented (i.e. the smaller, the better).
The absolute error scoring function is strictly \mathbb{F}
-consistent for
the median functional. \mathbb{F}
is the family of probability
distributions F
for which \textnormal{E}_F[Y]
exists and is finite
(Raiffa and Schlaifer 1961, p.196; Ferguson 1967, p.51; Thomson 1979; Saerens
2000; Gneiting 2011).
Ferguson TS (1967) Mathematical Statistics: A Decision-Theoretic Approach. Academic Press, New York.
Gneiting T (2011) Making and evaluating point forecasts. Journal of the American Statistical Association 106(494):746–762. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1198/jasa.2011.r10138")}.
Raiffa H,Schlaifer R (1961) Applied Statistical Decision Theory. Colonial Press, Clinton.
Saerens M (2000) Building cost functions minimizing to some summary statistics. IEEE Transactions on Neural Networks 11(6):1263–1271. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1109/72.883416")}.
Thomson W (1979) Eliciting production possibilities from a well-informed manager. Journal of Economic Theory 20(3):360–380. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/0022-0531(79)90042-5")}.
# Compute the absolute error scoring function.
df <- data.frame(
y = rep(x = 0, times = 5),
x = -2:2
)
df$absolute_error <- aerr_sf(x = df$x, y = df$y)
print(df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.