View source: R/obsweighted_sf.R
| obsweighted_sf | R Documentation |
The function obsweighted_sf computes the observation-weighted scoring function
when y materialises and x is the predictive
\dfrac{\textnormal{E}_F [Y^{2}]}{\textnormal{E}_F [Y]} functional.
The observation-weighted scoring function is defined on p. 752 in Gneiting (2011).
obsweighted_sf(x, y)
x |
Predictive |
y |
Realisation (true value) of process. It can be a vector of length
|
The observation-weighted scoring function is defined by:
S(x, y) := y (x - y)^{2}
Domain of function:
x > 0
y > 0
Range of function:
S(x, y) \geq 0, \forall x, y > 0
Vector of observation-weighted errors.
For details on the observation-weighted scoring function, see Gneiting (2011).
The observation-weighted scoring function is negatively oriented (i.e. the smaller, the better).
The observation-weighted scoring function is strictly
\mathbb{F}-consistent for the
\dfrac{\textnormal{E}_F [Y^{2}]}{\textnormal{E}_F [Y]} functional
(Theorem 5 and eq. (12) in Gneiting 2011). \mathbb{F} is the family of
probability distributions F concentrated on (0, \infty) for which
\textnormal{E}_F[Y], \textnormal{E}_F[Y^{2}] and
\textnormal{E}_F[Y^{3}] exist and are finite (Theorem 5 in
Gneiting 2011).
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")}.
obsweighted_rs
# Compute the observation-weighted scoring function.
df <- data.frame(
y = rep(x = 2, times = 3),
x = 1:3
)
df$obsweighted_penalty <- obsweighted_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.