Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

metriclab-0.0.1a0.tar.gz (23.8 kB view details)

Uploaded Source

Built Distribution

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

metriclab-0.0.1a0-py3-none-any.whl (38.7 kB view details)

Uploaded Python 3

File details

Details for the file metriclab-0.0.1a0.tar.gz.

File metadata

  • Download URL: metriclab-0.0.1a0.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":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for metriclab-0.0.1a0.tar.gz
Algorithm Hash digest
SHA256 d3bf03975e2c9ddb27e9d912af81c46f0885946c27a1b3ae8e2244a69c06eec0
MD5 b709251e7590e88f4149c1bbbb5247e3
BLAKE2b-256 dc9746162ffe9ea98a2f542a7f2a11683f4ddd8cd2543a268c43352100bd5e6a

See more details on using hashes here.

File details

Details for the file metriclab-0.0.1a0-py3-none-any.whl.

File metadata

  • Download URL: metriclab-0.0.1a0-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":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for metriclab-0.0.1a0-py3-none-any.whl
Algorithm Hash digest
SHA256 b54bdcef66e78d7f347821ade4ce3dd32b279e98160f103ed9fe487080af561e
MD5 cfe6132dccecb129fb44674b12b06c5d
BLAKE2b-256 b3736a4b5abccf15d768c2cbe6a13f7052952cce8d221575bcb2474c6aa752bc

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