Learn R Programming

Laurae (version 0.0.0.9001)

loss_LL_math: Loglikelihood Error (math function)

Description

This function computes the Loglikelihood Error loss (logloss) per value provided x, y (preds, labels) probabilities.

Usage

loss_LL_math(x, y)

Arguments

x
The predictions.
y
The labels.

Value

The Loglikelihood Error per value.

Details

Loss Formula : \(- (y_true * log(y_pred) + (1 - y_true) * log(1 - y_pred))\) Gradient Formula : \((1 - y_true)/(1 - y_pred) - y_true/y_pred\) Hessian Formula : \((1 - y_true)/((1 - y_pred) * (1 - y_pred)) + y_true/(y_pred * y_pred)\)

Examples

Run this code
## Not run: ------------------------------------
# SymbolicLoss(fc = loss_LL_math, xmin = 0, xmax = 1, y = rep(0, 21))
## ---------------------------------------------

Run the code above in your browser using DataLab