Skip to main content

Benchmark Reliability Framework (BRF) - dataset-level reliability auditing for predictive benchmarks

Project description

benchmark-reliability

A Python package for computing the Benchmark Reliability Framework (BRF): a four-dimension audit protocol that evaluates whether a predictive dataset is structurally reliable before model development.

Installation

pip install benchmark-reliability

Requires Python 3.8+ with numpy, scikit-learn, and matplotlib.

Quick Start

import numpy as np
from brf import BRFAnalyzer

# Your data
X = np.random.randn(200, 10)
y = np.random.randn(200)
groups = np.random.choice(["A", "B", "C"], 200)

# Run the audit
analyzer = BRFAnalyzer(n_splits=30, n_permutations=200).fit(X, y, groups=groups)

# Results
print(analyzer.brf_vector)
# {'B': 0.123, 'I': 0.045, 'N': 0.97, 'M': 0.82,
#  'S': 0.925, 'E': 0.943, 'class': 'Reliable'}

BRF Dimensions

Dimension Name Meaning
B Baseline Gain Model improvement over mean predictor
I Instability Sensitivity to train/test split choice
N Null Separability Signal distinguishability from noise
M Metadata Sufficiency Group structure completeness

The embedding coordinates S = N - I (Signal Identifiability) and E = B + M (Epistemic Completeness) classify datasets into one of three categories:

Class Condition Meaning
Reliable S > 0 and E > 0.5 Dataset supports reproducible model comparisons. Predictors carry signal beyond noise, and metadata (group structure) is adequate for cross-context evaluation.
Fragile S > 0 and E <= 0.5 Predictors show signal, but metadata is insufficient. Results may not generalize across groups (e.g., schools, courses, cohorts). Use with caution and report group-aware diagnostics.
Void S <= 0 No detectable signal beyond noise. Model performance on this dataset cannot be meaningfully interpreted. Consider whether the target, features, or sample size need revisiting.

Visualization

from brf.phase import plot_phase_diagram

plot_phase_diagram(
    [analyzer.S], [analyzer.E],
    labels=[analyzer.class_],
    classes=[analyzer.class_],
)

Export

from brf.report import export_json, export_latex

export_json(analyzer.brf_vector, "results.json")
latex_table = export_latex(analyzer.brf_vector)

Citation

If you use this package, please cite the BehaviorAudit paper:

BehaviorAudit: a four-dimension pre-modeling audit protocol
for educational prediction benchmarks. Scientific Reports (under review).

License

MIT

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

benchmark_reliability-0.1.5.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

benchmark_reliability-0.1.5-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file benchmark_reliability-0.1.5.tar.gz.

File metadata

  • Download URL: benchmark_reliability-0.1.5.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.10

File hashes

Hashes for benchmark_reliability-0.1.5.tar.gz
Algorithm Hash digest
SHA256 a12e9411c87dbe9d5cc4f271eae6cd304d598d826011ee525d21bdc4ca1aa694
MD5 da242cd924de4bc5d125e0d94d40484a
BLAKE2b-256 0409ee46fa22ce27b40ac5efc3ee05aac9cfddefdd06a056ab30b7f50c087ae8

See more details on using hashes here.

File details

Details for the file benchmark_reliability-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for benchmark_reliability-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 cc4c365c8d825083a56780207047621a4d877816405a9e11155512e9c485cabf
MD5 2cf93c11515f654ed1bca1c70d912a8c
BLAKE2b-256 033a23c219b07f044c8a4546e582b5ea993d275b82991c8059ef476797313d66

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page