bmedian_sf {scoringfunctions} | R Documentation |
-median scoring function
Description
The function bmedian_sf computes the -median scoring function
when
materializes and
is the predictive
functional.
The -median scoring function is defined in eq. (4) in Gneiting
(2011).
Usage
bmedian_sf(x, y, b)
Arguments
x |
Predictive |
y |
Realization (true value) of process. It can be a vector of length
|
b |
It can be a vector of length |
Details
The -median scoring function is defined by:
Domain of function:
Range of function:
Value
Vector of -median losses.
Note
For details on the -median scoring function, see Gneiting (2011).
The -median functional,
is the
median of a probability distribution whose density is proportional to
, where
is the density of the probability distribution
of
(Gneiting 2011).
The -median scoring function is negatively oriented (i.e. the
smaller, the better).
The -median scoring function is strictly consistent for the
functional relative to the family
of potential probability distributions (whose densities are
proportional to
, where
is the density of the
probability distribution
for the future
) (see Theorems 5 and 9
in Gneiting 2011).
References
Gneiting T (2011) Making and evaluating point forecasts. Journal of the American Statistical Association 106(494):746–762. doi:10.1198/jasa.2011.r10138.
Examples
# Compute the bmedian scoring function.
df <- data.frame(
y = rep(x = 2, times = 3),
x = 1:3,
b = c(-1, 1, 2)
)
df$bmedian_error <- bmedian_sf(x = df$x, y = df$y, b = df$b)
print(df)