ZeroOneLossMetric<T>

Models & Types · AiDotNet.Evaluation.Metrics.Classification

Computes Zero-One Loss: fraction of misclassifications (complement of accuracy).

Implements: IClassificationMetric<T>

For Beginners

Zero-one loss simply counts the proportion of wrong predictions. It’s exactly 1 - Accuracy. Unlike other loss functions, it treats all misclassifications equally regardless of how confident the wrong prediction was.

How It Works

Zero-One Loss = (1/N) * Σ(prediction ≠ actual)

Constructors

Constructor Summary
ZeroOneLossMetric()

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)