loss_LKL_math: Laurae's Kullback-Leibler Error (math function)

Description Usage Arguments Details Value Examples

Description

This function computes the Laurae's Kullback-Leibler Error loss per value provided x, y (preds, labels) values.

Usage

1

Arguments

x

The predictions.

y

The label.

Details

This loss function is strictly positive, therefore defined in \]0, +Inf\[. It penalizes lower values more heavily, and as such is a good fit for typical problems requiring fine tuning when undercommitting on the predictions. Compared to Laurae's Poisson loss function, Laurae's Kullback-Leibler loss has much higher loss. This loss function is experimental.

Loss Formula : (y_true - y_pred) * log(y_true / y_pred)

Gradient Formula : -((y_true - y_pred)/y_pred + log(y_true) - log(y_pred))

Hessian Formula : ((y_true - y_pred)/y_pred + 2)/y_pred

Value

The Laurae's Kullback-Leibler Error per value.

Examples

1
2
3
4
5
## Not run: 
SymbolicLoss(fc = loss_LKL_math, fc_ref = loss_MSE_math, xmin = 1, xmax = 100, y = rep(30, 21))
SymbolicLoss(fc = loss_LKL_math, fc_ref = loss_Poisson_math, xmin = 1, xmax = 100, y = rep(30, 21))

## End(Not run)

Laurae2/Laurae documentation built on May 8, 2019, 7:59 p.m.