MeanAbsolutePercentageErrorMetric<T>
Models & Types · AiDotNet.Evaluation.Metrics.Regression
Computes Mean Absolute Percentage Error with configurable handling of zeros.
Implements: IRegressionMetric<T>
For Beginners
MAPE expresses error as a percentage:
- Intuitive interpretation (e.g., “10% average error”)
- Scale-independent
- Warning: undefined when actual values are zero
- Asymmetric: penalizes over-predictions less than under-predictions
How It Works
MAPE = (100/N) × Σ |y - ŷ| / |y|
Constructors
| Constructor | Summary |
|---|---|
MeanAbsolutePercentageErrorMetric(double epsilon) |
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) |