Skip to contents

The book points at the quantile loss for probabilistic forecasts. The canonical statement is TFT eq. (25): QL(y, yhat, q) = q (y - yhat)_+ + (1 - q)(yhat - y)_+ – Lim, Arik, Loeff and Pfister, arXiv:1912.09363.

Usage

morie_pinball(y, qhat, q)

Arguments

y

observed values

qhat

forecast quantiles

q

the quantile level, in (0, 1)

Value

list(loss, total, coverage, q, n)

Examples

morie_pinball(y = c(1, 2, 3, 4, 5, 6, 7, 8), qhat = c(1, 2, 3, 4, 5, 6, 7, 8), q = 0.5)
#> $loss
#> [1] 0
#> 
#> $total
#> [1] 0
#> 
#> $coverage
#> [1] 1
#> 
#> $q
#> [1] 0.5
#> 
#> $n
#> [1] 8
#>