FBetaScoreMetric<T>
Models & Types · AiDotNet.Evaluation.Metrics.Classification
Computes F-beta score: weighted harmonic mean of precision and recall.
Implements: IClassificationMetric<T>
For Beginners
F-beta lets you weight precision vs recall:
- beta = 1: F1 score (equal weight)
- beta = 2: F2 score (recall twice as important as precision)
- beta = 0.5: F0.5 score (precision twice as important as recall)
How It Works
F_beta = (1 + beta²) * (precision * recall) / (beta² * precision + recall)
Constructors
| Constructor | Summary |
|---|---|
FBetaScoreMetric(double beta, AveragingMethod averaging) |
|
FBetaScoreMetric(double beta, T positiveLabel, AveragingMethod averaging) |
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) |