Debug machine learning classifiers and explain their predictions
Project description
====
ELI5
====
.. image:: https://img.shields.io/pypi/v/eli5.svg
:target: https://pypi-hypernode.com/pypi/eli5
:alt: PyPI Version
.. image:: https://travis-ci.org/TeamHG-Memex/eli5.svg?branch=master
:target: http://travis-ci.org/TeamHG-Memex/eli5
:alt: Build Status
.. image:: http://codecov.io/github/TeamHG-Memex/eli5/coverage.svg?branch=master
:target: http://codecov.io/github/TeamHG-Memex/eli5?branch=master
:alt: Code Coverage
.. image:: https://readthedocs.org/projects/eli5/badge/?version=latest
:target: http://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. 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 of random forests. ELI5
understands text processing utilities from scikit-learn and can highlight
text data accordingly. It also allows to debug scikit-learn pipelines which
contain HashingVectorizer, by undoing hashing.
* lightning_ - explain weights and predictions of lightning classifiers and
regressors.
* sklearn-crfsuite_. ELI5 allows to check weights of sklearn_crfsuite.CRF
models.
ELI5 also provides an alternative implementation of LIME_ algorithm,
which allows to explain predictions of any black-box classifier. This feature
is currently experimental.
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, 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/TeamHG-Memex/sklearn-crfsuite
.. _LIME: http://arxiv.org/abs/1602.04938
License is MIT.
Check `docs <http://eli5.readthedocs.io/>`_ for more.
Changelog
=========
0.1 (2016-11-24)
----------------
* HTML output;
* IPython integration;
* JSON output;
* visualization of scikit-learn text vectorizers;
* `sklearn-crfsuite <https://github.com/TeamHG-Memex/sklearn-crfsuite>`_
support;
* `lightning <https://github.com/scikit-learn-contrib/lightning>`_ support;
* :func:`eli5.show_weights` and :func:`eli5.show_prediction` functions;
* :func:`eli5.explain_weights` and :func:`eli5.explain_prediction`
functions;
* :ref:`eli5.lime <eli5-lime>` improvements: samplers for non-text data,
bug fixes, docs;
* HashingVectorizer is supported for regression tasks;
* performance improvements - feature names are lazy;
* sklearn ElasticNetCV and RidgeCV support;
* it is now possible to customize formatting output - show/hide sections,
change layout;
* sklearn OneVsRestClassifier support;
* sklearn DecisionTreeClassifier visualization (text-based or svg-based);
* dropped support for scikit-learn < 0.18;
* basic mypy type annotations;
* ``feature_re`` argument allows to show only a subset of features;
* ``target_names`` argument allows to change display names of targets/classes;
* ``targets`` argument allows to show a subset of targets/classes and
change their display order;
* documentation, more examples.
0.0.6 (2016-10-12)
------------------
* Candidate features in eli5.sklearn.InvertableHashingVectorizer
are ordered by their frequency, first candidate is always positive.
0.0.5 (2016-09-27)
------------------
* HashingVectorizer support in explain_prediction;
* add an option to pass coefficient scaling array; it is useful
if you want to compare coefficients for features which scale or sign
is different in the input;
* bug fix: classifier weights are no longer changed by eli5 functions.
0.0.4 (2016-09-24)
------------------
* eli5.sklearn.InvertableHashingVectorizer and
eli5.sklearn.FeatureUnhasher allow to recover feature names for
pipelines which use HashingVectorizer or FeatureHasher;
* added support for scikit-learn linear regression models (ElasticNet,
Lars, Lasso, LinearRegression, LinearSVR, Ridge, SGDRegressor);
* doc and vec arguments are swapped in explain_prediction function;
vec can now be omitted if an example is already vectorized;
* fixed issue with dense feature vectors;
* all class_names arguments are renamed to target_names;
* feature name guessing is fixed for scikit-learn ensemble estimators;
* testing improvements.
0.0.3 (2016-09-21)
------------------
* support any black-box classifier using LIME (http://arxiv.org/abs/1602.04938)
algorithm; text data support is built-in;
* "vectorized" argument for sklearn.explain_prediction; it allows to pass
example which is already vectorized;
* allow to pass feature_names explicitly;
* support classifiers without get_feature_names method using auto-generated
feature names.
0.0.2 (2016-09-19)
------------------
* 'top' argument of ``explain_prediction``
can be a tuple (num_positive, num_negative);
* classifier name is no longer printed by default;
* added eli5.sklearn.explain_prediction to explain individual examples;
* fixed numpy warning.
0.0.1 (2016-09-15)
------------------
Pre-release.
ELI5
====
.. image:: https://img.shields.io/pypi/v/eli5.svg
:target: https://pypi-hypernode.com/pypi/eli5
:alt: PyPI Version
.. image:: https://travis-ci.org/TeamHG-Memex/eli5.svg?branch=master
:target: http://travis-ci.org/TeamHG-Memex/eli5
:alt: Build Status
.. image:: http://codecov.io/github/TeamHG-Memex/eli5/coverage.svg?branch=master
:target: http://codecov.io/github/TeamHG-Memex/eli5?branch=master
:alt: Code Coverage
.. image:: https://readthedocs.org/projects/eli5/badge/?version=latest
:target: http://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. 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 of random forests. ELI5
understands text processing utilities from scikit-learn and can highlight
text data accordingly. It also allows to debug scikit-learn pipelines which
contain HashingVectorizer, by undoing hashing.
* lightning_ - explain weights and predictions of lightning classifiers and
regressors.
* sklearn-crfsuite_. ELI5 allows to check weights of sklearn_crfsuite.CRF
models.
ELI5 also provides an alternative implementation of LIME_ algorithm,
which allows to explain predictions of any black-box classifier. This feature
is currently experimental.
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, 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/TeamHG-Memex/sklearn-crfsuite
.. _LIME: http://arxiv.org/abs/1602.04938
License is MIT.
Check `docs <http://eli5.readthedocs.io/>`_ for more.
Changelog
=========
0.1 (2016-11-24)
----------------
* HTML output;
* IPython integration;
* JSON output;
* visualization of scikit-learn text vectorizers;
* `sklearn-crfsuite <https://github.com/TeamHG-Memex/sklearn-crfsuite>`_
support;
* `lightning <https://github.com/scikit-learn-contrib/lightning>`_ support;
* :func:`eli5.show_weights` and :func:`eli5.show_prediction` functions;
* :func:`eli5.explain_weights` and :func:`eli5.explain_prediction`
functions;
* :ref:`eli5.lime <eli5-lime>` improvements: samplers for non-text data,
bug fixes, docs;
* HashingVectorizer is supported for regression tasks;
* performance improvements - feature names are lazy;
* sklearn ElasticNetCV and RidgeCV support;
* it is now possible to customize formatting output - show/hide sections,
change layout;
* sklearn OneVsRestClassifier support;
* sklearn DecisionTreeClassifier visualization (text-based or svg-based);
* dropped support for scikit-learn < 0.18;
* basic mypy type annotations;
* ``feature_re`` argument allows to show only a subset of features;
* ``target_names`` argument allows to change display names of targets/classes;
* ``targets`` argument allows to show a subset of targets/classes and
change their display order;
* documentation, more examples.
0.0.6 (2016-10-12)
------------------
* Candidate features in eli5.sklearn.InvertableHashingVectorizer
are ordered by their frequency, first candidate is always positive.
0.0.5 (2016-09-27)
------------------
* HashingVectorizer support in explain_prediction;
* add an option to pass coefficient scaling array; it is useful
if you want to compare coefficients for features which scale or sign
is different in the input;
* bug fix: classifier weights are no longer changed by eli5 functions.
0.0.4 (2016-09-24)
------------------
* eli5.sklearn.InvertableHashingVectorizer and
eli5.sklearn.FeatureUnhasher allow to recover feature names for
pipelines which use HashingVectorizer or FeatureHasher;
* added support for scikit-learn linear regression models (ElasticNet,
Lars, Lasso, LinearRegression, LinearSVR, Ridge, SGDRegressor);
* doc and vec arguments are swapped in explain_prediction function;
vec can now be omitted if an example is already vectorized;
* fixed issue with dense feature vectors;
* all class_names arguments are renamed to target_names;
* feature name guessing is fixed for scikit-learn ensemble estimators;
* testing improvements.
0.0.3 (2016-09-21)
------------------
* support any black-box classifier using LIME (http://arxiv.org/abs/1602.04938)
algorithm; text data support is built-in;
* "vectorized" argument for sklearn.explain_prediction; it allows to pass
example which is already vectorized;
* allow to pass feature_names explicitly;
* support classifiers without get_feature_names method using auto-generated
feature names.
0.0.2 (2016-09-19)
------------------
* 'top' argument of ``explain_prediction``
can be a tuple (num_positive, num_negative);
* classifier name is no longer printed by default;
* added eli5.sklearn.explain_prediction to explain individual examples;
* fixed numpy warning.
0.0.1 (2016-09-15)
------------------
Pre-release.
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
eli5-0.1.tar.gz
(111.1 kB
view details)
Built Distribution
eli5-0.1-py2.py3-none-any.whl
(53.1 kB
view details)
File details
Details for the file eli5-0.1.tar.gz
.
File metadata
- Download URL: eli5-0.1.tar.gz
- Upload date:
- Size: 111.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c506f4afe2055b2bdf4799dc8f701a1e9160a38febefd1e4429b17b61021dbf9 |
|
MD5 | 4b3747de8af6fae1d2fe73d0ba3daf78 |
|
BLAKE2b-256 | 09fb22aecf664f3644ba7726ad5029a4bbd531f2775b6bf463e11ffca0e6bd12 |
Provenance
File details
Details for the file eli5-0.1-py2.py3-none-any.whl
.
File metadata
- Download URL: eli5-0.1-py2.py3-none-any.whl
- Upload date:
- Size: 53.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 402294aca43c2c8fab1aa2704ac085e6d7d607816c32778826cdb7d571d1dbdb |
|
MD5 | b1e4485c7610b23b79faaddbb91644e0 |
|
BLAKE2b-256 | 2df22dbac900d24af02cc7c05cc3feb0671c4c58c052b45df110bda2f1cc4cca |