MAPEMetric<T>

Models & Types · AiDotNet.Evaluation.Metrics.Regression

Computes Mean Absolute Percentage Error (MAPE): average percentage error.

Implements: IRegressionMetric<T>

For Beginners

MAPE expresses error as a percentage of actual values. MAPE = 5% means predictions are off by 5% on average. Easy to interpret but undefined when actual values are zero.

How It Works

MAPE = (100/N) * Σ|y_i - ŷ_i| / |y_i|

Limitations: Undefined for zero actuals, asymmetric (penalizes over-predictions less than under-predictions when actuals are large).

Constructors

Constructor Summary
MAPEMetric(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)