RelativeSquaredErrorMetric<T>

Models & Types · AiDotNet.Evaluation.Metrics.Regression

Computes Relative Squared Error (RSE): sum of squared errors relative to baseline model.

Implements: IRegressionMetric<T>

For Beginners

RSE compares your model to a baseline (mean predictor):

  • RSE < 1: Your model is better than the mean baseline
  • RSE = 1: Your model is equivalent to predicting the mean
  • RSE > 1: Your model is worse than the mean baseline
  • RSE = 1 - R² (when calculated correctly)

How It Works

RSE = Σ(y - ŷ)² / Σ(y - ȳ)²

Constructors

Constructor Summary
RelativeSquaredErrorMetric()

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)