eli5

A library for debugging/inspecting machine learning classifiers and explaining their predictions

https://github.com/eli5-org/eli5

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.0%) to scientific vocabulary

Keywords from Contributors

transformation cryptocurrencies notebook jax spec-0 repl ipython speech-recognition audio model-hub
Last synced: 10 months ago · JSON representation

Repository

A library for debugging/inspecting machine learning classifiers and explaining their predictions

Basic Info
  • Host: GitHub
  • Owner: eli5-org
  • License: mit
  • Language: Jupyter Notebook
  • Default Branch: master
  • Size: 68.5 MB
Statistics
  • Stars: 302
  • Watchers: 3
  • Forks: 45
  • Open Issues: 12
  • Releases: 0
Created over 5 years ago · Last pushed about 1 year ago
Metadata Files
Readme Changelog License

README.rst

====
ELI5
====

.. image:: https://img.shields.io/pypi/v/eli5.svg
   :target: https://pypi.python.org/pypi/eli5
   :alt: PyPI Version

.. image:: https://github.com/eli5-org/eli5/actions/workflows/python-package.yml/badge.svg?branch=master
   :target: https://github.com/eli5-org/eli5/actions
   :alt: Build Status

.. image:: https://codecov.io/github/TeamHG-Memex/eli5/coverage.svg?branch=master
   :target: https://codecov.io/github/TeamHG-Memex/eli5?branch=master
   :alt: Code Coverage

.. image:: https://readthedocs.org/projects/eli5/badge/?version=latest
   :target: https://eli5.readthedocs.io/en/latest/?badge=latest
   :alt: Documentation


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

.. image:: https://raw.githubusercontent.com/eli5-org/eli5/refs/heads/master/docs/source/static/readme-show-prediction.png
   :alt: explain_prediction for text data

.. image:: https://raw.githubusercontent.com/eli5-org/eli5/refs/heads/master/docs/source/static/gradcam-catdog.png
   :alt: explain_prediction for image data

.. image:: https://raw.githubusercontent.com/eli5-org/eli5/refs/heads/master/docs/source/static/readme-show-weights.png
   :alt: explain_weights 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.

* Keras_ - explain predictions of image classifiers via Grad-CAM visualizations.

* xgboost_ - show feature importances and explain predictions of XGBClassifier,
  XGBRegressor and xgboost.Booster.

* LightGBM_ - show feature importances and explain predictions of
  LGBMClassifier, LGBMRegressor and lightgbm.Booster.

* CatBoost_ - show feature importances of CatBoostClassifier,
  CatBoostRegressor and catboost.CatBoost.

* lightning_ - explain weights and predictions of lightning classifiers and
  regressors.

* sklearn-crfsuite_. ELI5 allows to check weights of sklearn_crfsuite.CRF
  models.

* OpenAI_ python client. ELI5 allows to explain LLM predictions with token probabilities.

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.

.. _lightning: https://github.com/scikit-learn-contrib/lightning
.. _scikit-learn: https://github.com/scikit-learn/scikit-learn
.. _sklearn-crfsuite: https://github.com/scrapinghub/sklearn-crfsuite
.. _LIME: https://eli5.readthedocs.io/en/latest/blackbox/lime.html
.. _TextExplainer: https://eli5.readthedocs.io/en/latest/tutorials/black-box-text-classifiers.html
.. _xgboost: https://github.com/dmlc/xgboost
.. _LightGBM: https://github.com/Microsoft/LightGBM
.. _Catboost: https://github.com/catboost/catboost
.. _Keras: https://keras.io/
.. _Permutation importance: https://eli5.readthedocs.io/en/latest/blackbox/permutation_importance.html
.. _Inspecting Black-Box Estimators: https://eli5.readthedocs.io/en/latest/blackbox/index.html
.. _OpenAI: https://github.com/openai/openai-python

License is MIT.

Check `docs `_ for more.

.. note::
    This project was previously developed at https://github.com/TeamHG-Memex/eli5/
    with support from `Hyperion Gray `_.

Owner

  • Name: eli5-org
  • Login: eli5-org
  • Kind: organization

GitHub Events

Total
  • Issues event: 11
  • Watch event: 38
  • Delete event: 12
  • Issue comment event: 39
  • Push event: 48
  • Pull request review comment event: 2
  • Pull request review event: 6
  • Pull request event: 28
  • Fork event: 4
  • Create event: 15
Last Year
  • Issues event: 11
  • Watch event: 38
  • Delete event: 12
  • Issue comment event: 39
  • Push event: 48
  • Pull request review comment event: 2
  • Pull request review event: 6
  • Pull request event: 28
  • Fork event: 4
  • Create event: 15

Committers

Last synced: over 2 years ago

All Time
  • Total Commits: 1,095
  • Total Committers: 21
  • Avg Commits per committer: 52.143
  • Development Distribution Score (DDS): 0.611
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Mikhail Korobov k****4@g****m 426
Konstantin Lopuhin k****n@g****m 413
teabolt t****0@g****m 185
Qiuyi He h****a@h****m 16
Karol Szepietowski k****i@g****m 12
Joel Nothman j****n@g****m 8
hofesh 6
Dima Kruk k****a@g****m 6
ivan i****o@g****m 5
Rafael Fernandes r****s@g****r 4
Mark E. Haase m****e@g****m 2
uj26kf m****z@i****m 2
Ruben r****e@g****m 2
Guy Rosin g****n@g****m 1
Rolando Espinoza r****4@g****m 1
Steve Peak s****e@c****o 1
Roland Szabo r****d@r****o 1
Ryan Varley r****n@g****m 1
Guillem García Subies 3****s 1
Ashwin Bhat 3****t 1
Dennis d****t 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 18
  • Total pull requests: 53
  • Average time to close issues: over 1 year
  • Average time to close pull requests: 2 months
  • Total issue authors: 18
  • Total pull request authors: 11
  • Average comments per issue: 2.44
  • Average comments per pull request: 0.87
  • Merged pull requests: 39
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 4
  • Pull requests: 25
  • Average time to close issues: 4 months
  • Average time to close pull requests: 9 days
  • Issue authors: 4
  • Pull request authors: 3
  • Average comments per issue: 2.75
  • Average comments per pull request: 1.0
  • Merged pull requests: 21
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • nkadochn (1)
  • zeromh (1)
  • mikekeith52 (1)
  • dwsmith1983 (1)
  • michael135 (1)
  • PGryllos (1)
  • enesok (1)
  • nickt121 (1)
  • Devsblacksin (1)
  • ThomasWolf0701 (1)
  • jmsquare (1)
  • leetabix (1)
  • raultomasmora (1)
  • mv96 (1)
  • Zahlii (1)
Pull Request Authors
  • lopuhin (34)
  • solegalli (6)
  • zzz4zzz (5)
  • rolisz (2)
  • az0 (2)
  • Richie94 (2)
  • dvorst (1)
  • amaiya (1)
  • nickt121 (1)
  • shlomota (1)
  • RobertCarruthers-Ki (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 2
  • Total downloads:
    • pypi 117,125 last-month
  • Total docker downloads: 643,059
  • Total dependent packages: 13
    (may contain duplicates)
  • Total dependent repositories: 423
    (may contain duplicates)
  • Total versions: 44
  • Total maintainers: 2
pypi.org: eli5

Debug machine learning classifiers and explain their predictions

  • Versions: 33
  • Dependent Packages: 12
  • Dependent Repositories: 409
  • Downloads: 117,125 Last month
  • Docker Downloads: 643,059
Rankings
Downloads: 0.5%
Dependent repos count: 0.7%
Dependent packages count: 0.9%
Docker downloads count: 0.9%
Average: 2.4%
Stargazers count: 4.4%
Forks count: 6.8%
Maintainers (2)
Last synced: 11 months ago
conda-forge.org: eli5

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

  • Versions: 11
  • Dependent Packages: 1
  • Dependent Repositories: 14
Rankings
Stargazers count: 7.8%
Forks count: 9.3%
Dependent repos count: 9.3%
Average: 13.9%
Dependent packages count: 29.0%
Last synced: 11 months ago

Dependencies

docs/requirements.txt pypi
  • ipython *
  • numpy >1.9.0
  • scikit-learn >=0.20
  • scipy *
  • sphinx *
  • sphinx_rtd_theme *
  • typing *
.github/workflows/python-package.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
requirements-test.txt pypi
  • hypothesis * test
  • pytest * test
  • pytest-cov * test
requirements.txt pypi
  • attrs >16.0.0
  • jinja2 >=3.0.0
  • numpy >=1.9.0
  • pip >=8.1
  • scikit-learn >=0.20
  • scipy *
  • setuptools >=20.7
  • singledispatch >=3.4.0.3
setup.py pypi
  • attrs *
  • graphviz *
  • jinja2 *
  • numpy *
  • scikit-learn *
  • scipy *
  • six *
  • tabulate >=0.7.7