BrierScoreMetric<T>

Models & Types · AiDotNet.Evaluation.Metrics.Classification

Computes Brier Score: mean squared error of probability predictions.

Implements: IProbabilisticClassificationMetric<T>

For Beginners

Brier score measures how close predicted probabilities are to actual outcomes.

  • Brier = 0: Perfect predictions (probabilities match outcomes exactly)
  • Brier = 0.25: Random guessing for binary classification
  • Brier = 1: Completely wrong (predicting 0% for all actual positives)

How It Works

Brier Score = (1/N) * Σ(p_i - y_i)²

Advantages: Sensitive to calibration, proper scoring rule, penalizes overconfidence.

Constructors

Constructor Summary
BrierScoreMetric()

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> probabilities, ReadOnlySpan<T> actuals, int numClasses, ConfidenceIntervalMethod ciMethod, double confidenceLevel, int bootstrapSamples, int? randomSeed)
T Compute(ReadOnlySpan<T> probabilities, ReadOnlySpan<T> actuals, int numClasses)