• Stars
    star
    102
  • Rank 335,584 (Top 7 %)
  • Language
    R
  • Created about 7 years ago
  • Updated 9 months ago

Reviews

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

Repository Details

Model Agnostics breakDown plots

CRAN_Status_Badge Downloads Total Downloads Build Status Coverage Status

Break Down: Model Agnostic Explainers for Individual Predictions

The breakDown package is a model agnostic tool for decomposition of predictions from black boxes. Break Down Table shows contributions of every variable to a final prediction. Break Down Plot presents variable contributions in a concise graphical way. This package works for binary classifiers and general regression models.

Find lots of R examples at breakDown website: https://pbiecek.github.io/breakDown/

Interested in the methodology? Find the math behind breakDown and live at: https://arxiv.org/abs/1804.01955

Looking for the python version of Break Down? Find it here: https://github.com/bondyra/pyBreakDown

New generation of the Break-Down algorithm is implemented in the iBreakDown package https://github.com/ModelOriented/iBreakDown. All new features will be added to the iBreakDown.

Installation

Install from CRAN

install.packages("breakDown")

Install from GitHub

devtools::install_github("pbiecek/breakDown")

Cheatsheets

Cheatsheet

Example for lm model

Get data with archivist

  • broken object: archivist::aread("pbiecek/breakDown/arepo/81c5be568d4db2ec795dedcb5d7d6599")
  • the plot: archivist::aread("pbiecek/breakDown/arepo/7b40949a0fdf9c22780454581d4b556e")

The R code

library(breakDown)
url <- 'https://archive.ics.uci.edu/ml/machine-learning-databases/wine-quality/winequality-white.csv'
wine <- read.table(url, header = T, sep=";")
head(wine, 3)
##   fixed.acidity volatile.acidity citric.acid residual.sugar chlorides free.sulfur.dioxide total.sulfur.dioxide density   pH
## 1           7.0             0.27        0.36           20.7     0.045                  45                  170  1.0010 3.00
## 2           6.3             0.30        0.34            1.6     0.049                  14                  132  0.9940 3.30
## 3           8.1             0.28        0.40            6.9     0.050                  30                   97  0.9951 3.26
##   sulphates alcohol quality
## 1      0.45     8.8       6
## 2      0.49     9.5       6
## 3      0.44    10.1       6
model <- lm(quality ~ fixed.acidity + volatile.acidity + citric.acid + residual.sugar + chlorides + free.sulfur.dioxide + total.sulfur.dioxide + density + pH + sulphates + alcohol,
               data = wine)
new_observation <- wine[1,]
br <- broken(model, new_observation)
br
##                            contribution
## (Intercept)                     5.90000
## residual.sugar = 20.7           1.20000
## density = 1.001                -1.00000
## alcohol = 8.8                  -0.33000
## pH = 3                         -0.13000
## free.sulfur.dioxide = 45        0.03600
## sulphates = 0.45               -0.02500
## volatile.acidity = 0.27         0.01500
## fixed.acidity = 7               0.00950
## total.sulfur.dioxide = 170     -0.00900
## citric.acid = 0.36              0.00057
## chlorides = 0.045               0.00019
## final_prognosis                 5.60000
plot(br)

plot for lm model

More Repositories

1

xai_resources

Interesting resources related to XAI (Explainable Artificial Intelligence)
R
816
star
2

ema

Explanatory Model Analysis. Explore, Explain and Examine Predictive Models
Jupyter Notebook
179
star
3

archivist

A set of tools for datasets and plots archiving
HTML
74
star
4

XAIatERUM2020

Workshop: Explanation and exploration of machine learning models with R and DALEX at eRum 2020
R
52
star
5

ceterisParibus

Ceteris Paribus Plots (What-If plots) for explanations of a single observation
Jupyter Notebook
41
star
6

xai_stories

XAI Stories. Case studies for eXplainable Artificial Intelligence
HTML
29
star
7

Przewodnik

Wersja 4.0 ,,Przewodnika po pakiecie R''
HTML
29
star
8

InterpretableMachineLearning2020

Lecture notes for 'Interpretable Machine Learning' at WUT and UoW. Summer semester 2019/2020
HTML
27
star
9

InterpretableMachineLearning2018S

Lecture notes for 'Interpretable Machine Learning' at WUW and UW. Summer semester 2018/2019
Jupyter Notebook
15
star
10

SmarterPoland_blog

HTML
13
star
11

PISA2012lite

datasets from PISA 2012 study
R
12
star
12

InterpretableMachineLearning2021

Lecture notes for 'Interpretable Machine Learning' at UoW. Summer semester 2020/2021
Jupyter Notebook
12
star
13

SmarterPoland

Set of tools developed by the Foundation SmarterPoland.pl [R package]
R
9
star
14

PogromcyDanych

R
8
star
15

BioColl2021

Notes for the tutorial "Introduction to Machine Learning with R" given at "Biometrisches Kolloquium 2021"
HTML
8
star
16

explainFIFA19

Show case for modelStudio based on FIFA 19 data
HTML
7
star
17

ddst

R package for Data driven smooth tests
R
6
star
18

xai_stories_2

XAI Stories 2.0. eXplainable Artificial Intelligence for Retail Analytics - case studies
TeX
6
star
19

vis_resources

Interesting resources related to DataVis, ModelVis, InfoVis
6
star
20

DataMining

Lecture notes for Advances in Data Mining
HTML
6
star
21

SPAG

Indexes of spatial agglomeration
R
5
star
22

UPC_2023

Introduction to eXplainable Machine Learning (XAI) at UPC (BarcelonaTech)
HTML
5
star
23

models

archivist repository with ML models
5
star
24

Talks

Conference talks and others
R
5
star
25

Diagnoza

Diagnoza Spoleczna, Social Diagnosis Objective and Subjective Quality of Life in Poland, data from http://diagnoza.com/
4
star
26

explainCOVID19

Test for COVID19 data and XAI/DALEX tools
4
star
27

TechnikiWizualizacjiDanych2018

Strona przedmiotu Techniki Wizualizacji Danych na wydziale MiNI PW
HTML
4
star
28

Open-Forest-Training-2021

HTML
3
star
29

EMR2023

Introduction to Responsible Machine Learning with examples in healthcare
HTML
3
star
30

automl_resources

Interesting resources related to AutoML
3
star
31

PISA2009lite

R
2
star
32

PM_VEE_examples

Examples for Predictive Models: Visual Exploration, Explanation and Debugging
HTML
2
star
33

bgmm

Gaussian Mixture Modeling algorithms. Including the belief-based mixture modeling [R package]
R
2
star
34

AdvancedR2018

Materials for WUT course Advanced Programming and Data Analysis with R
HTML
2
star
35

MOOC

Materiały dla kursu MOOC 2014
HTML
2
star
36

mi2

mi2 against covid
CSS
2
star
37

EuADS2023

EuADS Summer School – Data Science for Explainable and Trustworthy AI
HTML
2
star
38

challenges-xai-aging-aaai23

Supplementary materials to "Challenges facing the explainability of age prediction models: case study for two modalities"
2
star
39

AkademiaGECONiI

R
1
star
40

PISA2000lite

R
1
star
41

explainFIFA20

Show case for modelStudio based on ⚽⚽⚽FIFA 20 ⚽⚽⚽
HTML
1
star
42

explain_apartments

yet another modelStudio explainer, this time for apartment prices
1
star
43

xai-happiness

XAI use case based on world-happiness data
R
1
star
44

PISAdocs

How to work with PISA in R
1
star
45

DataProducts

Zajęcia z "Tworzenie ‘data-based products’ z programem R na MIM UW"
HTML
1
star
46

archivist2

Updated archivist, new function names, easier data management
HTML
1
star
47

graphGallery

HTML
1
star
48

live_simulations

Simulations and case studies concerning live package
HTML
1
star
49

CaseStudies2019W

Python
1
star
50

PIAAC

dataset from PIAAC study, converted from OECD website http://www.oecd.org/site/piaac/
R
1
star
51

pbiecek-website-old

My web page
HTML
1
star