Electric Barometer · Evaluation (eb-evaluation)
Evaluation and model selection utilities for applying Electric Barometer metrics across entities, groups, and operational contexts.
Overview
eb-evaluation applies Electric Barometer metrics across entities, groups, and hierarchies with DataFrame-first workflows, diagnostics, and cost-aware model selection. Metric primitives live in eb-metrics; feature construction and model adapters live elsewhere.
Installation
eb-evaluation is distributed as a standard Python package.
pip install eb-evaluation
The package supports Python 3.11 and later.
Core Concepts
- DataFrame-first evaluation — Evaluation logic operates directly on tabular forecast and observation data, enabling transparent aggregation, grouping, and comparison across entities and hierarchies.
- Cost- and tolerance-aware scoring — Forecast performance is assessed using metrics that reflect asymmetric cost and explicitly supplied deviation thresholds, rather than purely symmetric statistical error.
- Hierarchical and panel semantics — Evaluation respects entity boundaries, grouping structure, and temporal alignment, ensuring correctness in multi-level forecasting environments.
- Model comparability — Forecasts produced by heterogeneous models can be evaluated and compared using a consistent set of metrics and aggregation rules.
- Readiness-oriented selection — Model selection emphasizes execution feasibility and operational adequacy as reflected in evaluation metrics, not just aggregate accuracy, supporting decision-aligned forecasting workflows.
Minimal Example
The example below shows how forecast accuracy can be evaluated across entities using Electric Barometer metrics in a DataFrame-first workflow.
import pandas as pd
from eb_evaluation import compute_cwsl_df, evaluate_groups_df
df = pd.DataFrame({
"entity_id": ["A", "A", "B", "B"],
"actual": [10, 12, 7, 9],
"prediction": [9, 11, 8, 10],
})
# Single-slice CWSL (scalar)
loss = compute_cwsl_df(
df,
y_true_col="actual",
y_pred_col="prediction",
cu=2.0,
co=1.0,
)
# Per-entity metrics, including FRS (requires cwsl_max)
results = evaluate_groups_df(
df,
group_cols=["entity_id"],
actual_col="actual",
forecast_col="prediction",
cu=2.0,
co=1.0,
cwsl_max=0.30,
)
print(loss)
print(results)
License
BSD 3-Clause License. © 2026 Kyle Corrie.
Metadata
Release files for eb-evaluation 0.2.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| eb_evaluation-0.2.10.tar.gz | 88.3 kB | Without provenance | Details for eb_evaluation-0.2.10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| eb_evaluation-0.2.10-py3-none-any.whl | Python 3 | none | any | Details for eb_evaluation-0.2.10-py3-none-any.whl |
Total release size: 193.3 kB
Release files / eb_evaluation-0.2.10.tar.gz
| Download URL | eb_evaluation-0.2.10.tar.gz |
|---|---|
| Size | 88.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5d35eff2714aae7ed186769e2953c8929231c5b7d7e5f924c5096986b040696d
|
|
BLAKE2b-256 checksum How to use checksums |
f7b372cf5c01655b09b5d600be486150b1991bda82de0dcc3ae4e0b7c37f37a3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / eb_evaluation-0.2.10-py3-none-any.whl
| Download URL | eb_evaluation-0.2.10-py3-none-any.whl |
|---|---|
| Size | 105.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
72592cf7037b9cf70a918cd12d6a2a0e61fb926da8675e998dcd66813445c8d1
|
|
BLAKE2b-256 checksum How to use checksums |
38e820787a189c963d7e4ca9b66c197cf643f6b3c7be580e344edf4d90226728
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Security for eb-evaluation 0.2.10
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.