LIMEaid is an implementation of Local Interpretable Model-agnostic Interpretations (LIME) to help explain what machine learning classifier models are doing. LIMEaid supports explaining individual predictions for classifiers of data in tables (numpy arrays of numerical or categorical data), with a package called limeaid.
LIMEaid is based on and inspired by Marco Tulio Ribeiro's LIME work presented in this paper, with his code made available here.
LIMEaid helps explain any black box classifier (from an sklearn classifier method), with two or more classes.
For additional documentation of LIMEaid, see:
The lime package is on PyPI. Simply run:
pip install limeaid
Or clone this repository, then run:
python setup.py install
For tutorials in using LIMEaid with our provided dataset, which merges and classifies a prediction of mean, mid-career salary expectation (low, medium or high) based on where one graduated from college, see:
LIMEaid functions with other (tabular, numeric) datasources too. For a tutorial using the standard Iris dataset provided with scikit-learn, see:
Important:
-
The Jupyter notebooks examples above require the LIMEaid PyPI to be installed to run.
-
The .py examples must be run from the top level LIMEaid directory:
../LIMEaid > python .\examples\LIME_Education_ex.py
NOTE: If you are still running into issues with module path during import, this is a known issue. You can refer to Issue 26 which has details on the workaround that can be used.
-
Additional sources: We also evaluate additonal models using the common Iris dataset from sklearn.
- Python version 3.6 or above
The MIT License is a permissive free software license originating at the Massachusetts Institute of Technology (MIT). As a permissive license, it puts only very limited restriction on reuse and has therefore an excellent license compatibility. For detailed description of the contents of license please refer to the file LICENSE.
LIMEaid is organized as follows:
LIMEaid (master)
| .coveragerc
| .gitignore
| .travis.yml
| __init__.py
| environment.yml
| LICENSE
| README.md
| requirements.txt
| setup.py
|
|----- docs
| | ComponentSpec.ipynb
| | Data515TechReview.pptx
| | FunctionalSpec.md
| | LIMEaidFinal.pdf
| | LIMEaidFinal.pptx
| |
| |----- images
| | | Components.png
| | | Limeaid.png
|
|----- examples
| | __init__.py
| | LIME_Education_ex.py
| | LIME_Education_ex_notebook.ipynb
| | LIME_Iris_ex.py
| | LIME_Iris_ex_notebook.ipynb
|
|----- LIMEaid
| | __init__.py
| | version.py
| |
| |----- controller
| | | __init__.py
| | | fit_sklearn_models.py
| | | LIMEaid.py
| |
| |----- data
| | | Most-_Recent-_Cohorts-_Scorecard-_Elements.csv
| | | salaries-by-region.csv
| |
| |----- model
| | | __init__.py
| | | get_college_datasets.py
| | | load_college_dataset.py
| |
| |----- unittests
| | | __init__.py
| | | test_get_college_datasets.py
| | | test_lime_display.py
| | | test_lime_fit.py
| | | test_run_ml_models_for_college_ds.py
| | | test_versionpy.py
| |
| |----- view
| | | __init__.py
| | | LIMEdisplay.py