Skip to main content

The Judge/Scoring engine for XRTM.

Project description

xrtm-eval

License Python PyPI

The Judge for XRTM.

xrtm-eval is the rigorous scoring engine used to grade probabilistic forecasts. It operates independently of the inference engine to ensure objective evaluation.

Part of the XRTM Ecosystem

Layer 4: xrtm-train    → (imports all)
Layer 3: xrtm-forecast → (imports eval, data)
Layer 2: xrtm-eval     → (imports data) ← YOU ARE HERE
Layer 1: xrtm-data     → (zero dependencies)

xrtm-eval provides scoring metrics AND trust primitives used by the forecast engine.

Installation

pip install xrtm-eval

Core Primitives

1. Brier Score Breakdown

We do not use simple accuracy. We use the Brier Score, decomposed into its three component terms:

  • Reliability: How well do the predicted probabilities match observed frequencies?
  • Resolution: How well does the forecast distinguish between events that happen and those that don't?
  • Uncertainty: The inherent difficulty of the problem.
from xrtm.eval import BrierScoreEvaluator

evaluator = BrierScoreEvaluator()
score = evaluator.score(prediction=0.7, ground_truth=1)
# score = (0.7 - 1.0)^2 = 0.09

2. Expected Calibration Error (ECE)

Use the ExpectedCalibrationErrorEvaluator to measure the gap between confidence and accuracy across bin buckets.

3. Epistemic Trust Primitives (v0.1.1+)

xrtm-eval now includes trust scoring infrastructure:

from xrtm.eval.core.epistemics import IntegrityGuardian, SourceTrustRegistry

registry = SourceTrustRegistry()
guardian = IntegrityGuardian(registry)

Project Structure

src/xrtm/eval/
├── core/            # Interfaces & Schemas
│   ├── eval/            # Evaluator protocol, EvaluationResult
│   ├── epistemics.py    # Trust primitives (SourceTrustRegistry)
│   └── schemas/         # ForecastResolution
├── kit/             # Composable evaluator implementations
│   └── eval/metrics.py  # BrierScoreEvaluator, ECE
└── providers/       # External evaluation services (future)

Development

Prerequisites:

# Install dependencies
uv sync

# Run tests
uv run pytest

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

xrtm_eval-0.2.6.tar.gz (32.0 kB view details)

Uploaded Source

Built Distribution

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

xrtm_eval-0.2.6-py3-none-any.whl (38.8 kB view details)

Uploaded Python 3

File details

Details for the file xrtm_eval-0.2.6.tar.gz.

File metadata

  • Download URL: xrtm_eval-0.2.6.tar.gz
  • Upload date:
  • Size: 32.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for xrtm_eval-0.2.6.tar.gz
Algorithm Hash digest
SHA256 151d1f1cce61b5e2bfe81b9df048275a4cc07735d53a045c1203c7daec35f946
MD5 f12b8229d21d0eb40f77851e0ef858be
BLAKE2b-256 5e35a45322d5d4a00f6015178351f1bffb90b4b15cf9d01d8aafe5a5d2e8c9db

See more details on using hashes here.

Provenance

The following attestation bundles were made for xrtm_eval-0.2.6.tar.gz:

Publisher: publish.yml on xrtm-org/eval

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file xrtm_eval-0.2.6-py3-none-any.whl.

File metadata

  • Download URL: xrtm_eval-0.2.6-py3-none-any.whl
  • Upload date:
  • Size: 38.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for xrtm_eval-0.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 e8819a89b0ce755dcd4e9b8758842a8516b175c2e194a8800d52522125d1103b
MD5 e575dbd0beae299f53e324afeb051e78
BLAKE2b-256 68456196fbcc6de002e06f0e49750eeddc0278bef0aa6cde5203c458cd2eb818

See more details on using hashes here.

Provenance

The following attestation bundles were made for xrtm_eval-0.2.6-py3-none-any.whl:

Publisher: publish.yml on xrtm-org/eval

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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