Quantile loss
Usage
quantile_loss(
y,
y_hat,
q,
return_agg = c("mean", "sum", "vector"),
na.rm = FALSE
)Arguments
- y
Vector of observations.
- y_hat
Vector of predicted quantiles at probability level
q.- q
Probability level of the predicted quantile.
- return_agg
Whether to return the
"mean"(default),"sum", or"vector"of losses.- na.rm
A logical value indicating whether
NAvalues should be stripped before the computation proceeds.