Skip to main content

testAUC is a library of tools to evaluate the true performance of ML/AI models

Project description

testAUC

Official implementation of the tools discussed in The curious case of the test set AUROC

It is a set of tools designed for better evaluation of Binary Classification tasks in ML and AI. Specifically dealing with the expected performance of the model on new data.

Quick start

pip install testAUC

For and all-in-one view of the toolset, use the dashboad() function:

from testAUC import faux_normal_predictions, dashboard

# Simulate a model, evaluated on a Validation set and a Test set:
y_true_val, y_score_val = faux_normal_predictions(neg_mu=0.3, pos_mu=0.8, seed=2023)
y_true_tst, y_score_tst = faux_normal_predictions(std=0.5, neg_mu=0.4, pos_mu=0.9, seed=2023)

# All in one Dashboard to evaluate the Validation vs. Test sets performance
dashboard(y_true_val, y_score_val, y_true_tst, y_score_tst)

Demo

roc_drift, val_tst_colored_roc_curve, colored_roc_curve,dashboard noise_robustness, bias_robustness, plot_noise_robustness, plot_bias_robustness plot_wasserstein_distance_matrix, plot_predictions_hist

Mini-documentation of functions:

  • dashboard() -> An All-In-One dashboard to evaluate the test performance (good place to start!)
  • roc_drift() -> Calculate the ROC drift from validation to test sets
  • noise_robustness() -> Calculate the robustness of the predictions to normal noise
  • plot_noise_robustness() -> uses the noise_robustness to generate a plot
  • bias_robustness() -> Calculate the robustness of the predictions to bias between the classes
  • plot_bias_robustness() -> uses the bias_robustness to generate a plot
  • plot_wasserstein_distance_matrix() -> See paper to understand the importance of the matrix
  • colored_roc_curve() -> Plot an ROC curve that is color coded by threshold
  • val_tst_colored_roc_curve() -> Same colored ROC curve but for both val&tst sets (sharing color limits!)
  • faux_normal_predictions() -> A small utility function to create fake model predictions
  • plot_predictions_hist() -> Plot a histogram of predictions for the Positive and Negative classes

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

testauc-1.2.0.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

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

testauc-1.2.0-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file testauc-1.2.0.tar.gz.

File metadata

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

File hashes

Hashes for testauc-1.2.0.tar.gz
Algorithm Hash digest
SHA256 7ab90833cb4767e85c31e805f3f924aa643c54037c3a642b308ed3005c660330
MD5 9c1897e08f48711129e728930a13bbbe
BLAKE2b-256 82a63e8119aec921221f3b7e5e3d11f072330d655a9ce0e9d3f6b9e53b0990c9

See more details on using hashes here.

Provenance

The following attestation bundles were made for testauc-1.2.0.tar.gz:

Publisher: workflow.yml on alonhzn/testAUC

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

File details

Details for the file testauc-1.2.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for testauc-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b04a75916c3daca85d2229a609dbad9118d38e4d345126ec4f07a31c1e1ecc31
MD5 f9caa280e68e4a981da7dca09f99ada1
BLAKE2b-256 6d27ae5ca73290097919fd255f60c33d9364847bef9d97af1066a375fcbb39a2

See more details on using hashes here.

Provenance

The following attestation bundles were made for testauc-1.2.0-py3-none-any.whl:

Publisher: workflow.yml on alonhzn/testAUC

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