rhscope.bench.result¶
Benchmark result container.
BenchResult carries everything a reader needs to interpret a run:
pooled and per-category AUROC, threshold-dependent accuracy, calibration
metrics, and provenance (detector name, n_examples, split, dataset version).
Rendered as a markdown table via summary() or as JSON via to_dict().
- class rhscope.bench.result.BenchResult(detector_name, split, n_examples, pooled_auroc, accuracy, threshold, tpr, fpr, ece, brier, per_category_auroc=<factory>, per_category_count=<factory>, dataset_name='', dataset_version='', extra=<factory>)[source]¶
Bases:
objectResult of evaluating a detector on a benchmark split.
- Variables:
detector_name (str) – Identifier used in the summary table.
split (str) – Split name (
"train"/"val"/"test").n_examples (int) – Number of examples scored.
pooled_auroc (float) – AUROC computed over all categories combined.
accuracy (float) – Accuracy at the Youden-J-optimal threshold.
threshold (float) – The optimal threshold itself.
tpr (float) – True-positive rate at that threshold.
fpr (float) – False-positive rate at that threshold.
ece (float) – Expected calibration error (after sigmoid transform).
brier (float) – Brier score (after sigmoid transform).
per_category_auroc (dict[str, float]) – Mapping category -> AUROC over that subset. Empty when the benchmark has no category labels.
per_category_count (dict[str, int]) – Mapping category -> example count in this split.
dataset_name (str) – Human-readable dataset identifier.
dataset_version (str) – Version / hash tag for reproducibility.
extra (dict[str, Any]) – Free-form provenance fields preserved across serialization.
- Parameters: