Learn R Programming

scoringfunctions (version 1.1)

bregman3_sf: Bregman scoring function (type 3, QLIKE scoring function)

Description

The function bregman3_sf computes the Bregman scoring function when \(y\) materialises and \(x\) is the predictive mean functional.

The Bregman scoring function is defined by eq. (18) in Gneiting (2011) and the form implemented here for \(\phi(x) = -\log(x)\) is defined by eq. (20) in Gneiting (2011).

Usage

bregman3_sf(x, y)

Value

Vector of Bregman losses.

Arguments

x

Predictive mean functional (prediction). It can be a vector of length \(n\) (must have the same length as \(y\)).

y

Realisation (true value) of process. It can be a vector of length \(n\) (must have the same length as \(x\)).

Details

The Bregman scoring function (type 3) is defined by:

$$S(x, y) := (y/x) - \log(y/x) - 1$$

Domain of function:

$$x > 0$$

$$y > 0$$

Range of function:

$$S(x, y) \geq 0, \forall x, y > 0$$

References

Banerjee A, Guo X, Wang H (2005) On the optimality of conditional expectation as a Bregman predictor. IEEE Transactions on Information Theory 51(7):2664--2669. tools:::Rd_expr_doi("10.1109/TIT.2005.850145").

Gneiting T (2011) Making and evaluating point forecasts. Journal of the American Statistical Association 106(494):746--762. tools:::Rd_expr_doi("10.1198/jasa.2011.r10138").

Patton AJ (2011) Volatility forecast comparison using imperfect volatility proxies. Journal of Econometrics 160(1):246--256. tools:::Rd_expr_doi("10.1016/j.jeconom.2010.03.034").

Savage LJ (1971) Elicitation of personal probabilities and expectations. Journal of the American Statistical Association 66(337):783--810. tools:::Rd_expr_doi("10.1080/01621459.1971.10482346").

Examples

Run this code
# Compute the Bregman scoring function (type 3, QLIKE scoring function).

df <- data.frame(
    y = rep(x = 2, times = 3),
    x = 1:3
)

df$bregman3_penalty <- bregman3_sf(x = df$x, y = df$y)

print(df)

Run the code above in your browser using DataLab