| ghuber_rs | R Documentation |
The function ghuber_rs computes the realised generalized Huber score at a
specific level p and parameters a and b, when
\textbf{\textit{y}} materialises and \textbf{\textit{x}} is the
prediction.
Realised generalized Huber score is a realised score corresponding to the generalized Huber scoring function ghuber_sf.
ghuber_rs(x, y, p, a, b)
x |
Prediction. It can be a vector of length |
y |
Realisation (true value) of process. It can be a vector of length
|
p |
It can be a scalar. |
a |
It can be a value. |
b |
It can be a value. |
The realised generalized Huber score is defined by:
S(\textbf{\textit{x}}, \textbf{\textit{y}}, p, a, b) := (1/n)
\sum_{i = 1}^{n} L(x_i, y_i, p, a, b)
where
\textbf{\textit{x}} = (x_1, ..., x_n)^\mathsf{T}
\textbf{\textit{y}} = (y_1, ..., y_n)^\mathsf{T}
and
L(x, y, p, a, b) :=
|\textbf{1} \lbrace x \geq y \rbrace - p| f_{a, b}(x - y)
where
f_{a, b}(t) := \kappa_{a, b}(t) (2 t - \kappa_{a, b}(t))
and \kappa_{a, b}(t) is the capping function defined by:
\kappa_{a, b}(t) := \max \lbrace \min \lbrace t, b \rbrace, -a \rbrace
Domain of function:
\textbf{\textit{x}} \in \mathbb{R}^n
\textbf{\textit{y}} \in \mathbb{R}^n
0 < p < 1
a > 0
b > 0
Range of function:
S(\textbf{\textit{x}}, \textbf{\textit{y}}, p, a, b) \geq 0,
\forall \textbf{\textit{x}}, \textbf{\textit{y}} \in \mathbb{R}^n,
p \in (0, 1), a, b > 0
Value of the realised generalized Huber score.
For details on the generalized Huber scoring function, see ghuber_sf.
The concept of realised (average) scores is defined by Gneiting (2011) and Fissler and Ziegel (2019).
The realised generalized Huber score is the realised (average) score corresponding to the generalized Huber scoring function.
Fissler T, Ziegel JF (2019) Order-sensitivity and equivariance of scoring functions. Electronic Journal of Statistics 13(1):1166–1211. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1214/19-EJS1552")}.
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")}.
ghuber_sf, huberquantile_if
# Compute the realised generalized Huber score.
set.seed(12345)
p <- 0.7
a <- 0.5
b <- 0.5
x <- 0
y <- rnorm(n = 100, mean = 0, sd = 1)
print(ghuber_rs(x = x, y = y, p = p, a = a, b = b))
print(ghuber_rs(x = rep(x = x, times = 100), y = y, p = p, a = a, b = b))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.