Share via


ExpLoss Class

Definition

Exponential Loss, commonly used in classification tasks.

public sealed class ExpLoss : Microsoft.ML.Trainers.IClassificationLoss, Microsoft.ML.Trainers.ILossFunction<float,float>
type ExpLoss = class
    interface IClassificationLoss
    interface IScalarLoss
    interface ILossFunction<single, single>
Public NotInheritable Class ExpLoss
Implements IClassificationLoss, ILossFunction(Of Single, Single)
Inheritance
ExpLoss
Implements

Remarks

The Exponential Loss function is defined as:

$L(\hat{y}, y) = e^{-\beta y \hat{y}}$

where $\hat{y}$ is the predicted score, $y \in \{-1, 1\}$ is the true label, and $\beta$ is a scale factor set to 1 by default.

Note that the labels used in this calculation are -1 and 1, unlike Log Loss, where the labels used are 0 and 1. Also unlike Log Loss, $\hat{y}$ is the raw predicted score, not the predicted probability (which is calculated by applying a sigmoid function to the predicted score).

The Exponential Loss function penalizes incorrect predictions more than the Hinge Loss and has a larger gradient.

Constructors

ExpLoss(Single)

Methods

Derivative(Single, Single)
Loss(Single, Single)

Applies to