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
Instalation:
pip install mlbugdetection
Functions
-
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, sample, feature, start, stop, step=1)
-
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)
-
Calibration:
from mlbugdetection.calibration import calibration_check
Usage:
calibration_check(model, samples, target, pos_label=1)
-
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
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
mlbugdetection-0.0.10.tar.gz
(1.3 MB
view hashes)
Built Distribution
Close
Hashes for mlbugdetection-0.0.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c20d49f82c474f9b4c3cd2ebf75342871c2bae096d45d6ca53ca9b6582f33259 |
|
MD5 | c6549eeffda49b1c4b59ba7118f9662b |
|
BLAKE2b-256 | 57099b1356499d1990a4e12cd42cd021fb4f9419379a23e9da32c47f8d2a7847 |