TweedieLoss Class

Definition

Tweedie loss, based on the log-likelihood of the Tweedie distribution. This loss function is used in Tweedie regression.

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

Remarks

The Tweedie Loss function is defined as:

L(y^,y,i)={y^yln(y^)+ln(Γ(y))if i=1y^+yy^yif i=2(y^)2i2iy(y^)1i1i(y2i2iyy1i1i)otherwise

where y^ is the predicted value, y is the true label, Γ is the Gamma function, and i is the index parameter for the Tweedie distribution, in the range [1, 2]. i is set to 1.5 by default. i=1 is Poisson loss, i=2 is gamma loss, and intermediate values are compound Poisson-Gamma loss.

Constructors

TweedieLoss(Double)

Constructor for Tweedie loss.

Methods

Applies to

Product Versions
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