All Projects → MAIF → Shapash

MAIF / Shapash

Licence: apache-2.0
Shapash makes Machine Learning models transparent and understandable by everyone

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Shapash

Explainx
Explainable AI framework for data scientists. Explain & debug any blackbox machine learning model with a single line of code.
Stars: ✭ 196 (-70.88%)
Mutual labels:  transparency, jupyter-notebook
Catalogos Dados Brasil
Mapeamento de iniciativas (e catálogos) de dados abertos governamentais no Brasil.
Stars: ✭ 187 (-72.21%)
Mutual labels:  transparency, jupyter-notebook
Mli Resources
H2O.ai Machine Learning Interpretability Resources
Stars: ✭ 428 (-36.4%)
Mutual labels:  transparency, jupyter-notebook
Whotracks.me
Data from the largest and longest measurement of online tracking.
Stars: ✭ 189 (-71.92%)
Mutual labels:  transparency, jupyter-notebook
Interpretable machine learning with python
Examples of techniques for training interpretable ML models, explaining ML models, and debugging ML models for accuracy, discrimination, and security.
Stars: ✭ 530 (-21.25%)
Mutual labels:  transparency, jupyter-notebook
Batchgenerators
A framework for data augmentation for 2D and 3D image classification and segmentation
Stars: ✭ 655 (-2.67%)
Mutual labels:  jupyter-notebook
Jdata
京东JData算法大赛-高潜用户购买意向预测入门程序(starter code)
Stars: ✭ 662 (-1.63%)
Mutual labels:  jupyter-notebook
Tutorials
Ipython notebooks for math and finance tutorials
Stars: ✭ 654 (-2.82%)
Mutual labels:  jupyter-notebook
Tf Estimator Tutorials
This repository includes tutorials on how to use the TensorFlow estimator APIs to perform various ML tasks, in a systematic and standardised way
Stars: ✭ 649 (-3.57%)
Mutual labels:  jupyter-notebook
Cracking The Data Science Interview
A Collection of Cheatsheets, Books, Questions, and Portfolio For DS/ML Interview Prep
Stars: ✭ 672 (-0.15%)
Mutual labels:  jupyter-notebook
Asteroids atlas of space
Code, data, and instructions for mapping orbits of asteroids in the solar system
Stars: ✭ 668 (-0.74%)
Mutual labels:  jupyter-notebook
Self Driving Car
The Udacity open source self-driving car project
Stars: ✭ 5,769 (+757.21%)
Mutual labels:  jupyter-notebook
Tensorslow
Re-implementation of TensorFlow in pure python, with an emphasis on code understandability
Stars: ✭ 657 (-2.38%)
Mutual labels:  jupyter-notebook
Captcha Tensorflow
Image Captcha Solving Using TensorFlow and CNN Model. Accuracy 90%+
Stars: ✭ 660 (-1.93%)
Mutual labels:  jupyter-notebook
Eigentechno
Principal Component Analysis on music loops
Stars: ✭ 655 (-2.67%)
Mutual labels:  jupyter-notebook
Medium notebook
Repository containing notebooks of my posts on Medium
Stars: ✭ 671 (-0.3%)
Mutual labels:  jupyter-notebook
Architectureplaybook
The Open Architecture Playbook. Use it to create better and faster (IT)Architectures. OSS Tools, templates and more for solving IT problems using real open architecture tools that work!
Stars: ✭ 652 (-3.12%)
Mutual labels:  jupyter-notebook
Tensorflow tutorials
From the basics to slightly more interesting applications of Tensorflow
Stars: ✭ 5,548 (+724.37%)
Mutual labels:  jupyter-notebook
Keras Io
Keras documentation, hosted live at keras.io
Stars: ✭ 664 (-1.34%)
Mutual labels:  jupyter-notebook
Just Pandas Things
An ongoing list of pandas quirks
Stars: ✭ 660 (-1.93%)
Mutual labels:  jupyter-notebook

Shapash

Actions Status PyPI Python Version PyPI - License documentation badge



Shapash is a Python library which aims to make machine learning interpretable and understandable by everyone. It provides several types of visualization that display explicit labels that everyone can understand.


Data Scientists can more easily understand their models and share their results. End users can understand the decision proposed by a model using a summary of the most influential criteria.

  • Readthedocs: documentation badge
  • Medium: Towards AI
  • Presentation video for french speakers:

French Webinar



The objectives of shapash:

  • To display clear and understandable results: Plots and outputs use explicit labels for each feature and its values:

  • To allow Data Scientists to quickly understand their models by using a webapp to easily navigate between global and local explainability, and understand how the different features contribute: Live Demo Shapash-Monitor

  • To Summarize and export the local explanation:

Shapash proposes a short and clear local explanation. It allows each user, whatever their Data backround, to understand a local prediction of a supervised model thanks to an summarized and explicit explanation

  • To discuss results: Shapash allows Data Scientists to easily share and discuss their results with non-Data users

  • Use Shapash to deploy interpretability part of your project: From model training to deployment (API or Batch Mode)

How does shapash work?

Shapash is an overlay package for libraries dedicated to the interpretability of models. It uses Shap or Lime backend to compute contributions. Shapash builds on the different steps necessary to build a machine learning model to make the results understandable

User Manual

Shapash works for Regression, Binary Classification or Multiclass problem.
It is compatible with many models: Catboost, Xgboost, LightGBM, Sklearn Ensemble, Linear models, SVM.
Shapash can use category-encoders object, sklearn ColumnTransformer or simply features dictionary.

  • Category_encoder: OneHotEncoder, OrdinalEncoder, BaseNEncoder, BinaryEncoder, TargetEncoder
  • Sklearn ColumnTransformer: OneHotEncoder, OrdinalEncoder, StandardScaler, QuantileTransformer, PowerTransformer

You can use Shap or Lime, compute your own local contributions and use Shapash to display plot or summarize it.

Using Shapash is simple and requires only a few lines of code.
Most parameters are optional, you can displays plots effortlessly.

But you can also tune plots and outputs, specifying labels dict, features dict, encoders, predictions, ... : The more you specify parameters, options, dictionaries and more the outputs will be understandable

Installation

pip install shapash

Getting Started: 3 minutes to Shapash

The 4 steps to display results:

  • Step 1: Declare SmartExplainer Object

    You can declare features dict here to specify the labels to display

from shapash.explainer.smart_explainer import SmartExplainer
xpl = SmartExplainer(features_dict=house_dict) # optional parameter
  • Step 2: Compile Model, Dataset, Encoders, ...

    There are 2 mandatory parameters in compile method: Model and Dataset

xpl.compile(
    x=Xtest,
    model=regressor,
    preprocessing=encoder, # Optional: compile step can use inverse_transform method
    y_pred=y_pred, # Optional
    postprocessing=postprocess # Optional: see tutorial postprocessing
)
  • Step 3: Display output

    There are several outputs and plots available. for example, you can launch the web app:

app = xpl.run_app()

Live Demo Shapash-Monitor

  • Step 4: From training to deployment : SmartPredictor Object

    Shapash provides a SmartPredictor object to deploy the summary of local explanation for the operational needs. It is an object dedicated to deployment, lighter than SmartExplainer with additional consistency checks. SmartPredictor can be used with an API or in batch mode. It provides predictions, detailed or summarized local explainability using appropriate wording.

predictor = xpl.to_smartpredictor()

See the tutorial part to know how to use the SmartPredictor object

Tutorials

This github repository offers a lot of tutorials to allow you to start more concretely in the use of Shapash.

More Precise Overview

More details about charts and plots

The different ways to use Encoders and Dictionaries

Better displaying data with postprocessing

How to use shapash with Shap or Lime compute

Deploy local explainability in production

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].