QuantileLossMetric<T>
Models & Types · AiDotNet.Evaluation.Metrics.Regression
Computes Quantile Loss (Pinball Loss) for quantile regression.
Implements: IRegressionMetric<T>
For Beginners
Quantile loss is used when you want to predict a specific percentile:
- τ = 0.5: Median (equivalent to MAE)
- τ = 0.9: 90th percentile (over-predictions penalized less)
- τ = 0.1: 10th percentile (under-predictions penalized less)
How It Works
Quantile Loss = (1/N) × Σ max(τ(y - ŷ), (τ - 1)(y - ŷ))
Use cases:
- Risk assessment (predict 95th percentile of losses)
- Inventory planning (predict 99th percentile of demand)
- Uncertainty quantification (predict multiple quantiles)
Constructors
| Constructor | Summary |
|---|---|
QuantileLossMetric(double quantile) |
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) |