nicetoolbox.evaluation.metrics.categorical.pr_curve¶
Classes
Precision-recall curve and average precision (AP) per pre-compute group. |
- class nicetoolbox.evaluation.metrics.categorical.pr_curve.PrCurveMetric(metrics_config: BaseMetricConfig, config_handler: ConfigHandler)[source]¶
Precision-recall curve and average precision (AP) per pre-compute group.
Predictions must be float confidence scores; ground truth must be bool. AP is computed once per group by pooling all frames — same rationale as RocAucMetric (avoids averaging per-pair scores across groups with different support and class balance).
- Parameters:
metrics_config – Metric-specific configuration.
config_handler – Shared config handler with project and evaluation configs.
- compute() MetricResult[source]¶
Execute the metric end-to-end: load data, compute, return results.
- Returns:
MetricResult containing summary tables, per-frame arrays, and plots.