Skip to main content

Gesund Logo


Validation Metrics Library

Test  Workflow pre-commit PyPi PyPI Downloads License: MIT python

This library provides tools for calculating validation metrics for predictions and annotations in machine learning workflows. It includes a command-line tool for computing and displaying validation metrics.

Installation

To use this library, ensure you have the necessary dependencies installed in your environment. You can install them via pip:

pip install gesund==latest_version
pip install pycocotools@git+https://github.com/HammadK44/cocoapi.git@Dev#subdirectory=PythonAPI/

Basic Usage

# import the library

from gesund import Validation
from gesund.validation._result import ValidationResult
from gesund.core._managers.metric_manager import metric_manager
from gesund.core._managers.plot_manager import plot_manager

# Call the default configuration from utils
from utils import callable_plot_config

# Select your problem type {"classification", "object_detection", "semantic_segmentation"}

# example usage for problem type
problem_type = "classification"
plot_configuration = callable_plot_config(problem_type)
metric_name = "lift_chart"
cohort_id = None
data_dir = f"./tests/_data/{problem_type}"

# create a class instance
validator = Validation(
    annotations_path=f"{data_dir}/gesund_custom_format/annotation.json",
    predictions_path=f"{data_dir}/gesund_custom_format/prediction.json",
    class_mapping=f"{data_dir}/test_class_mappings.json",
    problem_type=problem_type,
    data_format="json",
    json_structure_type="gesund",
    plot_config=plot_configuration,
    cohort_args={"selection_criteria": "random"},
    metric_args={"threshold": [0.25, 0.5, 0.75]},
)

# run the validation workflow
validation_results = validator.run()
# save the results 
validation_results.save(metric_name)
# plot the results
validation_results.plot(metric_name="auc", save_plot=False, cohort_id=cohort_id)

Code of Conduct

We are committed to fostering a welcoming and inclusive community. Please adhere to the following guidelines when contributing to this project:

  • Respect: Treat everyone with respect and consideration. Harassment or discrimination of any kind is not tolerated.
  • Collaboration: Be open to collaboration and constructive criticism. Offer feedback gracefully and accept feedback in the same manner.
  • Inclusivity: Use inclusive language and be mindful of different perspectives and experiences.
  • Professionalism: Maintain a professional attitude in all project interactions.

By participating in this project, you agree to abide by this Code of Conduct. If you witness or experience any behavior that violates these guidelines, please contact the project maintainers.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Metadata

Release files for gesund 0.2.1

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

Source distribution (sdist)

Source distribution for gesund 0.2.1
File Size Uploaded Provenance Actions
gesund-0.2.1.tar.gz 61.3 kB Without provenance Details for gesund-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gesund 0.2.1
File Interpreter ABI Platform Actions
gesund-0.2.1-py3-none-any.whl Python 3 none any Details for gesund-0.2.1-py3-none-any.whl

Total release size: 156.7 kB

Release files / gesund-0.2.1.tar.gz

Download URL gesund-0.2.1.tar.gz
Size 61.3 kB
Tags Source
SHA-256 checksum
How to use checksums
764ef6ef79ba8f4a9a647648fbbe771be1618e680641d12a4086bebd730a6086
BLAKE2b-256 checksum
How to use checksums
66801d11666983eb8543528d7c03967c0101aacecf339d62f90b9d2f974a84fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.8.10

Release files / gesund-0.2.1-py3-none-any.whl

Download URL gesund-0.2.1-py3-none-any.whl
Size 95.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ea5719d67b75d159e45a261256091264dacb9245cdc9293e9b0188e622c3779c
BLAKE2b-256 checksum
How to use checksums
954afa212c1d662ae692f201c63291a9d31ac5858ba82f5d1ae594d7ec7fd243
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.8.10

Security for gesund 0.2.1

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.

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