quantile_loss: Quantile loss

View source: R/deepMetrics.r

quantile_lossR Documentation

Quantile loss

Description

Quantile loss

Usage

quantile_loss(actuals, preds, q = 0.5, na.rm = FALSE)

Arguments

actuals

A numeric vector of actual values.

preds

A numeric vector of prediction values.

q

A quantile fraction between 0 and 1.

na.rm

A logical value indicating whether actual and prediction pairs with at least one NA value should be ignored.

Details

This loss function tries to give different penalties to overestimation and underestimation. For q = 0.5, overestimation and underestimation are penalized by the same factor and the median is obtained. The smaller the value of q, the more overestimation is penalized compared to underestimation. A model based on it will then try to avoid overestimation approximately (1 - p) / p times as hard as underestimation.

Value

Quantile loss.

References

https://heartbeat.fritz.ai/5-regression-loss-functions-all-machine-learners-should-know-4fb140e9d4b0 https://www.evergreeninnovations.co/blog-quantile-loss-function-for-machine-learning/

See Also

Other Metrics: accuracy(), cross_entropy(), dice(), entropy(), erf(), erfc(), erfcinv(), erfinv(), gini_impurity(), huber_loss(), iou(), log_cosh_loss(), mae(), mape(), mse(), msle(), rmse(), rmsle(), rmspe(), sse(), stderror(), vc(), wape(), wmape()


stschn/deepANN documentation built on June 25, 2024, 7:27 a.m.