PrevalenceMetric<T>
Models & Types · AiDotNet.Evaluation.Metrics.Classification
Computes Prevalence: fraction of actual positives in the dataset.
Implements: IClassificationMetric<T>
For Beginners
Prevalence is the base rate of the positive class:
- Range: 0 to 1
- Not a performance metric but important context
- Affects interpretation of other metrics like PPV
- Low prevalence makes PPV unreliable even with high sensitivity
How It Works
Prevalence = (TP + FN) / N = Positives / Total
Constructors
| Constructor | Summary |
|---|---|
PrevalenceMetric() |
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) |