A light library to evaluate ML models
Project description
metriclab
metriclab provides lightweight result containers and utility helpers for
evaluating machine-learning predictions.
The library focuses on immutable result objects that expose a consistent API for comparing metric values, exporting them as dictionaries, and formatting them for display.
Quickstart
>>> from metriclab.results import AccuracyResult, Result
>>> accuracy = AccuracyResult(num_correct_predictions=7, num_predictions=10)
>>> accuracy.accuracy
0.7
>>> accuracy.to_dict(prefix="val_")
{'val_accuracy': 0.7, 'val_num_correct_predictions': 7, 'val_num_predictions': 10}
>>> Result({"loss": 0.2, "accuracy": 0.7}).to_display()
"{'loss': 0.2, 'accuracy': 0.7}"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file metriclab-0.0.1a1.tar.gz.
File metadata
- Download URL: metriclab-0.0.1a1.tar.gz
- Upload date:
- Size: 23.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
df3ecc7a67ce4718016cb171bbe04c6a9bf783e0d5e5a2392324345f6743dc58
|
|
| MD5 |
edf4ff62a3fd53cb13d92b6be4b2c7ad
|
|
| BLAKE2b-256 |
76ee9300fb5a16a8904cb0d9fc64741eda3cd70f4d55ebddf998575803cffe2b
|
File details
Details for the file metriclab-0.0.1a1-py3-none-any.whl.
File metadata
- Download URL: metriclab-0.0.1a1-py3-none-any.whl
- Upload date:
- Size: 38.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
498ca303dcee30f5844bc2f826b091cea4c3b392022060eb8c1df0af59cd4d53
|
|
| MD5 |
bc92ac62812e89b657eb86bf4cf6db62
|
|
| BLAKE2b-256 |
9e244b4a1b870699f363c40393c1390d24008449a5e3635b1fb7f9017c4f5b52
|