View source: R/accuracy_metrics.R
quantile_loss | R Documentation |
Quantile loss
quantile_loss(
y,
y_hat,
q,
return_agg = c("mean", "sum", "vector"),
na.rm = FALSE
)
y |
Vector of observations. |
y_hat |
Vector of predicted quantiles at probability level |
q |
Probability level of the predicted quantile. |
return_agg |
Whether to return the |
na.rm |
A logical value indicating whether |
The mean (or total or vectorial) quantile loss between y
and y_hat
at level q
.
quantile_loss(c(2.3, 4.2, 1.8), c(2.9, 5.6, 2.7), q=0.8)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.