TrueNegativeRateMetric<T>
Models & Types · AiDotNet.Evaluation.Metrics.Classification
Computes True Negative Rate (TNR): same as Specificity, TN / (TN + FP).
Implements: IClassificationMetric<T>
For Beginners
TNR answers: “Of all actual negatives, what proportion did we correctly identify?” This is the same as Specificity but named from a different perspective.
- TNR = 1: All negatives correctly identified
- TNR = 0.9: 90% of negatives correctly identified, 10% false alarms
How It Works
TNR = TN / (TN + FP) = Specificity = 1 - FPR
Constructors
| Constructor | Summary |
|---|---|
TrueNegativeRateMetric() |
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) |