Skip to content
A library for debugging/inspecting machine learning classifiers and explaining their predictions
Branch: master
Clone or download
kmike Merge pull request #296 from hofesh/master
Support XGBClassifier with pandas DataFrame in PermutationImportance
Latest commit 55a063c Feb 14, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
_ci Ignore as_dataframe in nodeps eli5 tests Jun 29, 2017
docs Merge pull request #191 from rmax-contrib/conda-install Feb 7, 2019
eli5
notebooks Apply pandoc 2.x to all notebooks Jan 9, 2019
tests fix missing new line Feb 12, 2019
.coveragerc
.gitignore type annotation coverage report Jul 21, 2017
.travis.yml
CHANGES.rst
LICENSE.txt DOC add license file Nov 24, 2016
MANIFEST.in Basic support for html formatting Oct 12, 2016
README.rst Update README.rst May 29, 2018
codecov.yml TST disable project coverage check Sep 23, 2016
constraints-test.txt Fix doctest failure due to numpy 1.14 May 21, 2018
requirements-test.txt
requirements.txt require attrs > 16.0.0 (early versions don’t have ‘slots’ option) Nov 25, 2016
setup.cfg
setup.py
tox.ini

README.rst

ELI5

PyPI Version Build Status Code Coverage Documentation

ELI5 is a Python package which helps to debug machine learning classifiers and explain their predictions.

explain_prediction for text data

It provides support for the following machine learning frameworks and packages:

  • scikit-learn. Currently ELI5 allows to explain weights and predictions of scikit-learn linear classifiers and regressors, print decision trees as text or as SVG, show feature importances and explain predictions of decision trees and tree-based ensembles. ELI5 understands text processing utilities from scikit-learn and can highlight text data accordingly. Pipeline and FeatureUnion are supported. It also allows to debug scikit-learn pipelines which contain HashingVectorizer, by undoing hashing.
  • xgboost - show feature importances and explain predictions of XGBClassifier, XGBRegressor and xgboost.Booster.
  • LightGBM - show feature importances and explain predictions of LGBMClassifier and LGBMRegressor.
  • lightning - explain weights and predictions of lightning classifiers and regressors.
  • sklearn-crfsuite. ELI5 allows to check weights of sklearn_crfsuite.CRF models.

ELI5 also implements several algorithms for inspecting black-box models (see Inspecting Black-Box Estimators):

  • TextExplainer allows to explain predictions of any text classifier using LIME algorithm (Ribeiro et al., 2016). There are utilities for using LIME with non-text data and arbitrary black-box classifiers as well, but this feature is currently experimental.
  • Permutation importance method can be used to compute feature importances for black box estimators.

Explanation and formatting are separated; you can get text-based explanation to display in console, HTML version embeddable in an IPython notebook or web dashboards, a pandas.DataFrame object if you want to process results further, or JSON version which allows to implement custom rendering and formatting on a client.

License is MIT.

Check docs for more.


define hyperiongray
You can’t perform that action at this time.