Skip to main content

uq-metrics

Uncertainty quantification metrics for model evaluation. Pure NumPy implementation.

Installation

pip install uq-metrics

For plotting support:

pip install uq-metrics[plot]

Usage

from uq_metrics import auroc, ece, brier_score, aurc
import numpy as np

y_true = np.array([0, 0, 1, 1, 1])
y_scores = np.array([0.2, 0.3, 0.6, 0.8, 0.9])

auroc(y_true, y_scores)        # Area Under ROC Curve
ece(y_true, y_scores)          # Expected Calibration Error
brier_score(y_true, y_scores)  # Brier Score

# With plotting
score, ax = auroc(y_true, y_scores, plot=True)

Available Metrics

  • auroc - Area Under ROC Curve
  • ece - Expected Calibration Error
  • brier_score - Brier Score
  • aurc - Area Under Risk-Coverage Curve
  • error_vs_abstention - Error rates at abstention levels
  • optimal_abstention - Find optimal abstention threshold

Metadata

Release files for uq-metrics 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for uq-metrics 0.1.0
File Size Uploaded
uq_metrics-0.1.0.tar.gz 8.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for uq-metrics 0.1.0
File Interpreter ABI Platform
uq_metrics-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 17.6 kB

Release files / uq_metrics-0.1.0.tar.gz

Download URL uq_metrics-0.1.0.tar.gz
Size 8.0 kB
Tags Source
SHA-256 checksum
How to use checksums
4c798df14844d94d19748edd0ce4879180746b7445af8f40a390eace00116f52
BLAKE2b-256 checksum
How to use checksums
6f3cd77ca983f192422b1bbd5c30faf06a28ada65931f5de7e83f5d88bce69e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.3

Release files / uq_metrics-0.1.0-py3-none-any.whl

Download URL uq_metrics-0.1.0-py3-none-any.whl
Size 9.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
64ca88a7c86f5d631ad6be34047f720cda6913557f092284c2111ef84096b41d
BLAKE2b-256 checksum
How to use checksums
692527fb7ce0463981c369b70113029007cf0eb24a99c8301e15c649f5b89b40
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.3

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page