Skip to main content

A package for identify Machine Learning bugs

Project description

MLBugDetection

Machine learning explainability and unexpectated behaviors detection

Overview

Most machine learning explainability packages requires both trained models and the training data to create Explainer objects that explain the model's behavior. This package allows ceteris paribus analysis of features using only the trained model and one or more input samples.

Documentation

Installation:

pip install mlbugdetection

How to use

Functions

  1. Monotonic:

    from mlbugdetection.monotonic import check_monotonicity_single_sample, check_monotonicity_multiple_samples
    

    Usage: For 1 sample

    check_monotonicity_single_sample(model, sample, feature, start, stop, step=1)
    

    For more than 1 sample:

    check_monotonicity_multiple_samples(model, samples, feature, start, stop, step=1) 
    
  2. Critical Values:

    from mlbugdetection.critical_values import find_critical_values, find_several_critical_values
    

    Usage: For 1 sample

    find_critical_values(model, sample, feature, start, stop, step=1)
    

    For more than 1 sample:

    find_several_critical_values(model, samples, feature, start, stop, step=1, bins=15, keep_n=5, log=False)
    
  3. Calibration:

    from mlbugdetection.calibration import calibration_check
    

    Usage:

    calibration_check(model, samples, target, pos_label=1)
    
  4. Sanity:

    from mlbugdetection.sanity import sanity_check, sanity_check_with_indexes
    

    Usage:

    sanity_check(model, samples, target)
    

    If test not pass, check the indexes

    sanity_check_with_indexes(model, samples, target)
    

Virtual Environment with Jupyter Notebook

python3 -m virtualenv venv 
source venv/bin/activate
python -m pip install --upgrade pip
pip install -r requirements.txt

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

mlbugdetection-0.0.12.tar.gz (1.3 MB view details)

Uploaded Source

Built Distribution

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

mlbugdetection-0.0.12-py3-none-any.whl (1.3 MB view details)

Uploaded Python 3

File details

Details for the file mlbugdetection-0.0.12.tar.gz.

File metadata

  • Download URL: mlbugdetection-0.0.12.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for mlbugdetection-0.0.12.tar.gz
Algorithm Hash digest
SHA256 65f4f9c3974cbb5e3cf09c2b001b859b325946401b5c9c8ca3b5144ce5db33a2
MD5 09f20552e5efd19ed9570ff24bf99b61
BLAKE2b-256 6413a271cd9397e5f2cfe050b47707ba912d2f64796b6b562627e6d96aa496c4

See more details on using hashes here.

File details

Details for the file mlbugdetection-0.0.12-py3-none-any.whl.

File metadata

File hashes

Hashes for mlbugdetection-0.0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 a45ec1b1752bee3ad8399623dbde9af2fc8739bc21bba4eeed1c03ecc4a9f3b0
MD5 410a2811cd8f6cfd44d8e813479e83a8
BLAKE2b-256 2a529a85e1dd30383bf02641f000c0be6fe79e24f0215794ca51256646f6c3d3

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