• Stars
    star
    1,318
  • Rank 34,281 (Top 0.7 %)
  • Language
    Python
  • License
    GNU General Publi...
  • Created about 6 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

moDel Agnostic Language for Exploration and eXplanation

moDel Agnostic Language for Exploration and eXplanation

R build status Coverage Status CRAN_Status_Badge Total Downloads DrWhy-eXtrAI

Python-check Supported Python versions PyPI version Downloads

Overview

Unverified black box model is the path to the failure. Opaqueness leads to distrust. Distrust leads to ignoration. Ignoration leads to rejection.

The DALEX package xrays any model and helps to explore and explain its behaviour, helps to understand how complex models are working. The main function explain() creates a wrapper around a predictive model. Wrapped models may then be explored and compared with a collection of local and global explainers. Recent developents from the area of Interpretable Machine Learning/eXplainable Artificial Intelligence.

The philosophy behind DALEX explanations is described in the Explanatory Model Analysis e-book. The DALEX package is a part of DrWhy.AI universe.

If you work with scikit-learn, keras, H2O, tidymodels, xgboost, mlr or mlr3 in R, you may be interested in the DALEXtra package, which is an extension of DALEX with easy to use explain_*() functions for models created in these libraries.

Additional overview of the dalex Python package is available.

Installation

The DALEX R package can be installed from CRAN

install.packages("DALEX")

The dalex Python package is available on PyPI and conda-forge

pip install dalex -U

conda install -c conda-forge dalex

Learn more

Machine Learning models are widely used and have various applications in classification or regression tasks. Due to increasing computational power, availability of new data sources and new methods, ML models are more and more complex. Models created with techniques like boosting, bagging of neural networks are true black boxes. It is hard to trace the link between input variables and model outcomes. They are use because of high performance, but lack of interpretability is one of their weakest sides.

In many applications we need to know, understand or prove how input variables are used in the model and what impact do they have on final model prediction. DALEX is a set of tools that help to understand how complex models are working.

Resources

R package

Python package

Talks about DALEX

Citation

If you use DALEX in R or dalex in Python, please cite our JMLR papers:

@article{JMLR:v19:18-416,
  author  = {Przemyslaw Biecek},
  title   = {DALEX: Explainers for Complex Predictive Models in R},
  journal = {Journal of Machine Learning Research},
  year    = {2018},
  volume  = {19},
  number  = {84},
  pages   = {1-5},
  url     = {http://jmlr.org/papers/v19/18-416.html}
}

@article{JMLR:v22:20-1473,
  author  = {Hubert Baniecki and
             Wojciech Kretowicz and
             Piotr Piatyszek and 
             Jakub Wisniewski and 
             Przemyslaw Biecek},
  title   = {dalex: Responsible Machine Learning 
             with Interactive Explainability and Fairness in Python},
  journal = {Journal of Machine Learning Research},
  year    = {2021},
  volume  = {22},
  number  = {214},
  pages   = {1-7},
  url     = {http://jmlr.org/papers/v22/20-1473.html}
}

Why

76 years ago Isaac Asimov devised Three Laws of Robotics: 1) a robot may not injure a human being, 2) a robot must obey the orders given it by human beings and 3) A robot must protect its own existence. These laws impact discussion around Ethics of AI. Today’s robots, like cleaning robots, robotic pets or autonomous cars are far from being conscious enough to be under Asimov’s ethics.

Today we are surrounded by complex predictive algorithms used for decision making. Machine learning models are used in health care, politics, education, judiciary and many other areas. Black box predictive models have far larger influence on our lives than physical robots. Yet, applications of such models are left unregulated despite many examples of their potential harmfulness. See Weapons of Math Destruction by Cathy O'Neil for an excellent overview of potential problems.

It's clear that we need to control algorithms that may affect us. Such control is in our civic rights. Here we propose three requirements that any predictive model should fulfill.

  • Prediction's justifications. For every prediction of a model one should be able to understand which variables affect the prediction and how strongly. Variable attribution to final prediction.
  • Prediction's speculations. For every prediction of a model one should be able to understand how the model prediction would change if input variables were changed. Hypothesizing about what-if scenarios.
  • Prediction's validations For every prediction of a model one should be able to verify how strong are evidences that confirm this particular prediction.

There are two ways to comply with these requirements. One is to use only models that fulfill these conditions by design. White-box models like linear regression or decision trees. In many cases the price for transparency is lower performance. The other way is to use approximated explainers – techniques that find only approximated answers, but work for any black box model. Here we present such techniques.

Acknowledgments

Work on this package was financially supported by the NCN Opus grant 2016/21/B/ST6/02176 and NCN Opus grant 2017/27/B/ST6/01307.

More Repositories

1

DrWhy

DrWhy is the collection of tools for eXplainable AI (XAI). It's based on shared principles and simple grammar for exploration, explanation and visualisation of predictive models.
R
670
star
2

modelStudio

📍 Interactive Studio for Explanatory Model Analysis
R
318
star
3

randomForestExplainer

A set of tools to understand what is happening inside a Random Forest
R
226
star
4

modelDown

modelDown generates a website with HTML summaries for predictive models
R
119
star
5

forester

Trees are all you need
HTML
107
star
6

survex

Explainable Machine Learning in Survival Analysis
R
89
star
7

fairmodels

Flexible tool for bias detection, visualization, and mitigation
R
82
star
8

iBreakDown

Break Down with interactions for local explanations (SHAP, BreakDown, iBreakDown)
R
79
star
9

treeshap

Compute SHAP values for your tree-based models using the TreeSHAP algorithm
R
75
star
10

shapviz

R package for SHAP plots
R
63
star
11

DALEXtra

Extensions for the DALEX package
R
62
star
12

auditor

Model verification, validation, and error analysis
R
58
star
13

shapper

An R wrapper of SHAP python library
R
58
star
14

ingredients

Effects and Importances of Model Ingredients
R
37
star
15

live

Local Interpretable (Model-agnostic) Visual Explanations - model visualization for regression problems and tabular data based on LIME method. Available on CRAN
R
34
star
16

SAFE

Surrogate Assisted Feature Extraction
Python
33
star
17

DALEX-docs

Documentation for the DALEX project
Jupyter Notebook
33
star
18

kernelshap

Efficient R implementation of SHAP
R
30
star
19

ArenaR

Data generator for Arena - interactive XAI dashboard
R
29
star
20

rSAFE

Surrogate Assisted Feature Extraction in R
R
28
star
21

EIX

Structure mining for xgboost model
R
25
star
22

factorMerger

Set of tools to support results from post hoc testing
R
24
star
23

EMMA

Evaluation of Methods for dealing with Missing data in Machine Learning algorithms
HTML
23
star
24

xspliner

Explain black box with GLM
R
23
star
25

EloML

R package EloML: Elo rating system for machine learning models
R
23
star
26

Arena

Interactive XAI dashboard
Vue
22
star
27

MAIR

Monitoring of AI Regulations
HTML
19
star
28

pyCeterisParibus

Python library for Ceteris Paribus Plots (What-if plots)
Python
19
star
29

xai2shiny

Create Shiny application with model exploration from explainers
R
19
star
30

drifter

Concept Drift and Concept Shift Detection for Predictive Models
R
18
star
31

localModel

LIME-like explanations with interpretable features based on Ceteris Paribus curves. Now on CRAN.
R
14
star
32

vivo

Variable importance via oscillations
R
14
star
33

corrgrapher

Visualize correlations between variables
R
13
star
34

metaMIMIC

Jupyter Notebook
10
star
35

EvidenceBasedML

Evidence-Based Machine Learning
9
star
36

weles

Python
9
star
37

triplot

Triplot: Instance- and data-level explanations for the groups of correlated features.
R
9
star
38

xai2cloud

Create web API from model explainers
R
8
star
39

FairPAN

R
7
star
40

AI-strategies-papers-regulations-monitoring

Monitoring of AI strategies, papers, and regulations
Jupyter Notebook
7
star
41

xaibot

XAI chat bot for Titanic model - created with plumber
JavaScript
7
star
42

piBreakDown

python version of iBreakDown
Python
4
star
43

RME

Recurrent Memory Explainer
Python
3
star
44

mogger

Logger for Predictive Models
Java
2
star
45

ceterisParibus2

Very experimental version of the ceterisParibus package.
Jupyter Notebook
2
star
46

DrWhyTemplate

CSS
2
star
47

shimex

R Package for Exploring Models with Shiny App
R
2
star
48

DALEX2

Explain! Package with core wrappers for DrWhy universe.
R
2
star
49

ModelDevelopmentProcess

Source codes for Model Development Process plots
HTML
1
star
50

Hex4DrWhy

Shiny app for logo prototyping
R
1
star