Прочетете на английски

Споделяне чрез


SmoothedHingeLoss Class

Definition

A smooth version of the HingeLoss function, commonly used in classification tasks.

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

Remarks

Let f(y^,y)=1yy^, where y^ is the predicted score and y{1,1} is the true label. f(y^,y) here is the non-zero portion of the Hinge Loss.

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).

The Smoothed Hinge Loss function is then defined as:

L(f(y^,y))={0if f(y^,y)<0(f(y^,y))22αif f(y^,y)<αf(y^,y)α2otherwise

where α is a smoothing parameter set to 1 by default.

Constructors

SmoothedHingeLoss(Single)

Constructor for smoothed hinge losee.

Methods

Applies to

Продукт Версии
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, Preview, 4.0.0