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 Reliable, Fragile, or Void.

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.4.tar.gz (10.1 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.4-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: benchmark_reliability-0.1.4.tar.gz
  • Upload date:
  • Size: 10.1 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.4.tar.gz
Algorithm Hash digest
SHA256 9ed73c3098ad11c2a066277cde29d7d84ef46836dd958d507f1fb69d554346e4
MD5 2c8d39977f7dc51cbc4a7ce3a259784d
BLAKE2b-256 7583fc26c05e0469d47ed4c5c7d16e43a236d9431b6f96dab4d6761426fd5c8e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for benchmark_reliability-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 23d1b96fe183244f8f005c47a0c7d7734d47220a91a2c424e28e27dd139d5956
MD5 a186b691ec1b7b74178bbe2be2686a2e
BLAKE2b-256 03ef0105a490ae257fc8a4c4718b69e11a37da2afd66f3fc8c2054186b3deee0

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