Basahin sa Ingles

Ibahagi sa


HingeLoss Class

Definition

Hinge Loss, commonly used in classification tasks.

C#
public sealed class HingeLoss : Microsoft.ML.Trainers.ILossFunction<float,float>, Microsoft.ML.Trainers.ISupportSdcaClassificationLoss
Inheritance
HingeLoss
Implements

Remarks

The Hinge Loss function is defined as:

L(y^,y)=max(0,myy^)

where y^ is the predicted score, y{1,1} is the true label, and m is the margin parameter 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, y^ is the raw predicted score, not the predicted probability (which is calculated by applying a sigmoid function to the predicted score).

While the hinge loss function is both convex and continuous, it is not smooth (that is not differentiable) at yy^=m. Consequently, it cannot be used with gradient descent methods or stochastic gradient descent methods, which rely on differentiability over the entire domain.

For more, see Hinge Loss for classification.

Constructors

Methods

Applies to

Produkto Mga Bersyon
ML.NET 1.0.0, 1.1.0, 1.2.0, 1.3.1, 1.4.0, 1.5.0, 1.6.0, 1.7.0, 2.0.0, 3.0.0, 4.0.0, Preview