TweedieLossMetric<T>
Models & Types · AiDotNet.Evaluation.Metrics.Regression
Computes Tweedie Deviance Loss for regression with power parameter.
Implements: IRegressionMetric<T>
For Beginners
Tweedie loss is flexible for different data types:
- Power = 0: Normal distribution (like MSE)
- Power = 1: Poisson distribution (count data)
- Power = 2: Gamma distribution (positive continuous)
- Power = 3: Inverse Gaussian distribution
- 1 < Power < 2: Compound Poisson-Gamma (insurance claims)
How It Works
When to use:
- Insurance claim prediction (zeros and positives)
- Sales forecasting with many zeros
- Any data with mixed zero and positive values
Constructors
| Constructor | Summary |
|---|---|
TweedieLossMetric(double power) |
Properties
| Property | Summary |
|---|---|
MetricDirection Direction { get; } |
|
T MaxValue { get; } |
|
T MinValue { get; } |
|
bool RequiresProbabilities { get; } |
|
bool SupportsMultiClass { get; } |
|
string Category { get; } |
|
string Description { get; } |
|
string Name { get; } |
Methods
| Method | Summary |
|---|---|
MetricWithCI<T> ComputeWithCI(ReadOnlySpan<T> predictions, ReadOnlySpan<T> actuals, ConfidenceIntervalMethod ciMethod, double confidenceLevel, int bootstrapSamples, int? randomSeed) |
|
T Compute(ReadOnlySpan<T> predictions, ReadOnlySpan<T> actuals) |