FalsePositiveRateMetric<T>

Models & Types · AiDotNet.Evaluation.Metrics.Classification

Computes False Positive Rate (FPR): proportion of actual negatives incorrectly predicted as positive.

Implements: IClassificationMetric<T>

For Beginners

FPR answers: “Of all the actual negatives, how many did I incorrectly flag as positive?”

  • FPR = 0: Perfect - no false alarms
  • FPR = 0.1: 10% of actual negatives are incorrectly flagged as positive
  • FPR = 1: All negatives are incorrectly classified as positive

Critical in spam detection (low FPR = fewer legitimate emails marked as spam) and medical screening (low FPR = fewer healthy people incorrectly told they’re sick).

How It Works

FPR = FP / (FP + TN) = 1 - Specificity

Constructors

Constructor Summary
FalsePositiveRateMetric()
FalsePositiveRateMetric(T positiveLabel)

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)