OptimizedPrecisionMetric<T>

Models & Types · AiDotNet.Evaluation.Metrics.Classification

Computes Optimized Precision: Accuracy - |Sensitivity - Specificity| / (Sensitivity + Specificity).

Implements: IClassificationMetric<T>

For Beginners

Optimized Precision:

  • Penalizes classifiers that favor one class over another
  • Encourages balance between sensitivity and specificity
  • Range: typically 0 to 1
  • Higher values indicate better overall performance

How It Works

OP = Accuracy - |Sensitivity - Specificity| / (Sensitivity + Specificity)

Constructors

Constructor Summary
OptimizedPrecisionMetric()

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)