├── .Rbuildignore ├── .gitignore ├── DESCRIPTION ├── DrWhy.Rproj ├── NAMESPACE ├── NEWS.md ├── R ├── logo.R ├── toadd.R └── zzz.R ├── README.md ├── _pkgdown.yml ├── docs ├── 404.html ├── MI2logo.jpg ├── articles │ ├── index.html │ └── manifesto.html ├── authors.html ├── dalexverse-2.css ├── dalexverse.css ├── drwhy_znak_violet.jpg ├── drwhy_znak_violet_small.jpg ├── drwhylogo.jpg ├── images │ ├── DALEXverse.png │ ├── DrWhy.png │ ├── DrWhyAI.key │ ├── DrWhyAI.pdf │ ├── DrWhyAI.png │ ├── Hype_Cycle.svg │ ├── ModelDevelopmentProcess.pdf │ ├── diagramMDP.png │ ├── family.ai │ ├── family.png │ ├── grammar_of_explanations.png │ ├── local_attributions_1.jpg │ ├── local_attributions_1.pdf │ ├── local_attributions_2.jpg │ ├── local_attributions_2.pdf │ ├── local_interactions_1.jpg │ ├── local_interactions_1.pdf │ ├── local_profile_1.jpg │ ├── local_profile_1.pdf │ ├── mi2.svg │ ├── misc1.png │ ├── misc2.jpg │ ├── misc3.jpg │ ├── misc4.jpg │ └── misc5.jpg ├── index.html ├── jquery.sticky-kit.min.js ├── link.svg ├── news │ └── index.html ├── pkgdown.css ├── pkgdown.js ├── pkgdown.yml ├── reference │ ├── DrWhy_logo.html │ └── index.html └── tocBullet.svg ├── hex-stickers ├── DrWhy-RGB-DALEX.png ├── DrWhy-RGB-DALEXtra.png ├── DrWhy-RGB-EloML.png ├── DrWhy-RGB-auditor.png ├── DrWhy-RGB-fairmodels.pdf ├── DrWhy-RGB-fairmodels.png ├── DrWhy-RGB-iBreakDown.png ├── DrWhy-RGB-ingredients.png ├── DrWhy-RGB-modelStudio.png ├── DrWhy-RGB-rSAFE.png ├── DrWhy-RGB-randomForestExplainer.png ├── DrWhy-RGB-shapper.png ├── DrWhy-RGB-vivo.png └── DrWhy-RGB-xspliner.png ├── images ├── DALEXverse.png ├── DrWhy.png ├── DrWhyAI.key ├── DrWhyAI.pdf ├── DrWhyAI.png ├── Hype_Cycle.svg ├── ModelDevelopmentProcess.pdf ├── diagramMDP.png ├── family.ai ├── family.png ├── grammar_of_explanations.png ├── local_attributions_1.jpg ├── local_attributions_1.pdf ├── local_attributions_2.jpg ├── local_attributions_2.pdf ├── local_interactions_1.jpg ├── local_interactions_1.pdf ├── local_profile_1.jpg ├── local_profile_1.pdf └── mi2.svg ├── logo ├── README.md ├── d1.png ├── d2.png ├── d3.png ├── d4.png └── drwhy_hex.png ├── man └── DrWhy_logo.Rd ├── tests ├── testthat.R └── testthat │ └── test_loaded.R └── vignettes ├── DALEX_architecture.png └── manifesto.Rmd /.Rbuildignore: -------------------------------------------------------------------------------- 1 | ^.*\.Rproj$ 2 | ^\.Rproj\.user$ 3 | _pkgdown.yml 4 | ^images.* 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .Rproj.user 2 | .Rhistory 3 | .RData 4 | .Ruserdata 5 | -------------------------------------------------------------------------------- /DESCRIPTION: -------------------------------------------------------------------------------- 1 | Package: DrWhy 2 | Title: Explain, Explore and Debug Predictive Machine Learning Models 3 | Version: 2019.12 4 | Authors@R: person("Przemyslaw", "Biecek", email = "przemyslaw.biecek@gmail.com", role = c("aut", "cre"), 5 | comment = c(ORCID = "0000-0001-8423-1823")) 6 | Description: The 'DrWhy.AI' is the collection of tools for Explainable AI (XAI). 7 | It's based on principles and the grammar for exploration, 8 | explanation and visualisation of predictive models. 9 | This package is designed to make it easy to install and load multiple 10 | packages from the 'DrWhy.AI' universe. 11 | License: GPL-3 12 | BugReports: https://github.com/ModelOriented/DrWhy/issues 13 | Depends: R (>= 3.6) 14 | Imports: 15 | DALEX, 16 | DALEXtra, 17 | ingredients, 18 | iBreakDown, 19 | auditor, 20 | drifter, 21 | archivist, 22 | modelDown, 23 | modelStudio 24 | Suggests: 25 | EIX, 26 | randomForestExplainer, 27 | shapper 28 | VignetteBuilder: knitr 29 | Encoding: UTF-8 30 | LazyData: true 31 | RoxygenNote: 7.0.2 32 | -------------------------------------------------------------------------------- /DrWhy.Rproj: -------------------------------------------------------------------------------- 1 | Version: 1.0 2 | 3 | RestoreWorkspace: No 4 | SaveWorkspace: No 5 | AlwaysSaveHistory: Default 6 | QuitChildProcessesOnExit: Default 7 | 8 | EnableCodeIndexing: Yes 9 | UseSpacesForTab: Yes 10 | NumSpacesForTab: 2 11 | Encoding: UTF-8 12 | 13 | RnwWeave: knitr 14 | LaTeX: XeLaTeX 15 | 16 | AutoAppendNewline: Yes 17 | StripTrailingWhitespace: Yes 18 | 19 | BuildType: Package 20 | PackageUseDevtools: Yes 21 | PackageInstallArgs: --no-multiarch --with-keep.source 22 | PackageRoxygenize: rd,collate,namespace 23 | -------------------------------------------------------------------------------- /NAMESPACE: -------------------------------------------------------------------------------- 1 | # Generated by roxygen2: do not edit by hand 2 | 3 | export(DrWhy_logo) 4 | -------------------------------------------------------------------------------- /NEWS.md: -------------------------------------------------------------------------------- 1 | # DrWhy 0.9 2 | 3 | First version created based on tidyverse 1.2.1.9000 4 | -------------------------------------------------------------------------------- /R/logo.R: -------------------------------------------------------------------------------- 1 | #' The DrWhy logo, using ASCII art 2 | #' 3 | #' @export 4 | #' @examples 5 | #' DrWhy_logo() 6 | 7 | DrWhy_logo <- function() { 8 | logo <- c( 9 | " _____ ", 10 | " ____ _ _ _ _ |___ |", 11 | " | \\ ___ | | | | |_ _ _| _|", 12 | " | | | _| | | | | | | |_| ", 13 | " |____/|_| |_____|_|_|_ |_| ", 14 | " |___| ") 15 | cat(logo, sep = "\n") 16 | } 17 | 18 | -------------------------------------------------------------------------------- /R/toadd.R: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | # -------------------- 4 | # 5 | # ### survxai 6 | # 7 | # 8 | # -------------------- 9 | # 10 | # ### drifter 11 | # 12 | # -------------------- 13 | # 14 | # ### localModel 15 | # 16 | # -------------------- 17 | # 18 | # ### xspliner 19 | # 20 | # * xspliner [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/xspliner)](https://cran.r-project.org/package=xspliner) [![Travis-CI Build Status](https://travis-ci.org/ModelOriented/xspliner.svg?branch=master)](https://travis-ci.org/ModelOriented/xspliner) [![Coverage Status](https://img.shields.io/codecov/c/github/ModelOriented/xspliner/master.svg)](https://codecov.io/github/ModelOriented/xspliner?branch=master) [![Downloads](http://cranlogs.r-pkg.org/badges/grand-total/xspliner?color=orange)](http://cranlogs.r-pkg.org/badges/grand-total/xspliner) (maintainer: [krystian8207](https://github.com/krystian8207)) 21 | # 22 | # 23 | # -------------------- 24 | # 25 | # ### pyDALEX 26 | # 27 | # * pyDALEX [![Build Status](https://api.travis-ci.org/MI2DataLab/pyDALEX.svg?branch=master)](https://travis-ci.org/MI2DataLab/pyDALEX) [![Coverage 28 | # Status](https://img.shields.io/codecov/c/github/MI2DataLab/pyDALEX/master.svg)](https://codecov.io/github/MI2DataLab/pyDALEX?branch=master) (maintainer: [magda-tatarynowicz](https://github.com/magda-tatarynowicz)) 29 | # 30 | # 31 | # -------------------- 32 | # 33 | # ### SAFE 34 | # 35 | # * SAFE for R [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/SAFE)](https://cran.r-project.org/package=SAFE) [![Travis-CI Build Status](https://travis-ci.org/MI2DataLab/SAFE.svg?branch=master)](https://travis-ci.org/MI2DataLab/SAFE) [![Coverage Status](https://img.shields.io/codecov/c/github/MI2DataLab/SAFE/master.svg)](https://codecov.io/github/MI2DataLab/SAFE?branch=master) [![Downloads](http://cranlogs.r-pkg.org/badges/grand-total/SAFE?color=orange)](http://cranlogs.r-pkg.org/badges/grand-total/SAFE) (maintainer: [AnnaGierlak](https://github.com/AnnaGierlak)) 36 | # * SAFE for Python [![Downloads](https://pepy.tech/badge/safe-transformer)](https://pepy.tech/project/safe-transformer)[![PyPI version](https://badge.fury.io/py/safe-transformer.svg)](https://badge.fury.io/py/safe-transformer)[![Build Status](https://api.travis-ci.org/ModelOriented/SAFE.svg?branch=master)](https://travis-ci.org/ModelOriented/SAFE) [![Coverage 37 | # Status](https://img.shields.io/codecov/c/github/ModelOriented/SAFE/master.svg)](https://codecov.io/github/ModelOriented/SAFE?branch=master) (maintainer: [olagacek](https://github.com/olagacek)) 38 | # 39 | # 40 | # -------------------- 41 | # 42 | # ### pyCeterisParibus 43 | # 44 | # [![Downloads](https://pepy.tech/badge/pyCeterisParibus)](https://pepy.tech/project/pyCeterisParibus)[![PyPI version](https://badge.fury.io/py/pyCeterisParibus.svg)](https://badge.fury.io/py/pyCeterisParibus)[![Build Status](https://api.travis-ci.org/ModelOriented/pyCeterisParibus.svg?branch=master)](https://travis-ci.org/ModelOriented/pyCeterisParibus) [![Coverage 45 | # Status](https://img.shields.io/codecov/c/github/ModelOriented/pyCeterisParibus/master.svg)](https://codecov.io/github/ModelOriented/pyCeterisParibus?branch=master) (maintainer: [kmichael08](https://github.com/kmichael08)) 46 | # 47 | # 48 | # -------------------- 49 | # 50 | # ### ceterisParibusD3 51 | # 52 | # [![Build Status](https://api.travis-ci.org/ModelOriented/ceterisParibusD3.svg?branch=master)](https://travis-ci.org/ModelOriented/ceterisParibusD3) [![Coverage 53 | # Status](https://img.shields.io/codecov/c/github/ModelOriented/ceterisParibusD3/master.svg)](https://codecov.io/github/ModelOriented/ceterisParibusD3?branch=master) (maintainer: [flaminka](https://github.com/flaminka)) 54 | # 55 | # 56 | # -------------------- 57 | # 58 | # ### randomForestExplainer 59 | # 60 | # 61 | # * randomForestExplainer [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/randomForestExplainer)](https://cran.r-project.org/package=randomForestExplainer) [![Build Status](https://api.travis-ci.org/MI2DataLab/randomForestExplainer.svg?branch=master)](https://travis-ci.org/MI2DataLab/randomForestExplainer) [![Coverage 62 | # Status](https://img.shields.io/codecov/c/github/MI2DataLab/randomForestExplainer/master.svg)](https://codecov.io/github/MI2DataLab/randomForestExplainer?branch=master) [![Downloads](http://cranlogs.r-pkg.org/badges/grand-total/randomForestExplainer?color=orange)](http://cranlogs.r-pkg.org/badges/grand-total/randomForestExplainer) 63 | # 64 | # 65 | # -------------------- 66 | # 67 | # ### factorMerger 68 | # 69 | # * factorMerger [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/factorMerger)](https://cran.r-project.org/package=factorMerger) [![Build Status](https://api.travis-ci.org/MI2DataLab/factorMerger.svg?branch=master)](https://travis-ci.org/MI2DataLab/factorMerger) [![Coverage 70 | # Status](https://img.shields.io/codecov/c/github/MI2DataLab/factorMerger/master.svg)](https://codecov.io/github/MI2DataLab/factorMerger?branch=master) [![Downloads](http://cranlogs.r-pkg.org/badges/grand-total/factorMerger?color=orange)](http://cranlogs.r-pkg.org/badges/grand-total/factorMerger) 71 | # 72 | # -------------------- 73 | # 74 | # ### cr17 75 | # 76 | # 77 | # * cr17 [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/cr17)](https://cran.r-project.org/package=cr17) [![Build Status](https://api.travis-ci.org/geneticsMiNIng/cr17.svg?branch=master)](https://travis-ci.org/geneticsMiNIng/cr17) [![Coverage 78 | # Status](https://img.shields.io/codecov/c/github/geneticsMiNIng/cr17/master.svg)](https://codecov.io/github/geneticsMiNIng/cr17?branch=master) [![Downloads](http://cranlogs.r-pkg.org/badges/grand-total/cr17?color=orange)](http://cranlogs.r-pkg.org/badges/grand-total/cr17) 79 | # 80 | # -------------------- 81 | # 82 | # ### pyBreakDown 83 | # 84 | # * pyBreakDown [![Build Status](https://api.travis-ci.org/MI2DataLab/pyBreakDown.svg?branch=master)](https://travis-ci.org/MI2DataLab/pyBreakDown) [![Coverage 85 | # Status](https://img.shields.io/codecov/c/github/MI2DataLab/pyBreakDown/master.svg)](https://codecov.io/github/MI2DataLab/pyBreakDown?branch=master) 86 | # 87 | # -------------------- 88 | # 89 | # ### breakDown 90 | # 91 | # * breakDown [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/breakDown)](https://cran.r-project.org/package=breakDown) [![Build Status](https://api.travis-ci.org/pbiecek/breakDown.svg?branch=master)](https://travis-ci.org/pbiecek/breakDown) [![Coverage 92 | # Status](https://img.shields.io/codecov/c/github/pbiecek/breakDown/master.svg)](https://codecov.io/github/pbiecek/breakDown?branch=master) [![Downloads](http://cranlogs.r-pkg.org/badges/grand-total/breakDown?color=orange)](http://cranlogs.r-pkg.org/badges/grand-total/breakDown) (development moved to `iBreakDown`) 93 | # 94 | # -------------------- 95 | # 96 | # ### live 97 | # 98 | # * live [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/live)](https://CRAN.R-project.org/package=live) [![Total Downloads](http://cranlogs.r-pkg.org/badges/grand-total/live?color=orange)](https://cranlogs.r-pkg.org/badges/grand-total/live) [![Build Status](https://travis-ci.org/MI2DataLab/live.svg?branch=master)](https://travis-ci.org/MI2DataLab/live) [![Coverage Status](https://img.shields.io/codecov/c/github/MI2DataLab/live/master.svg)](https://codecov.io/github/MI2DataLab/live?branch=master)[![Downloads](http://cranlogs.r-pkg.org/badges/grand-total/live?color=orange)](http://cranlogs.r-pkg.org/badges/grand-total/live) (development moved to `localModel`) 99 | # 100 | -------------------------------------------------------------------------------- /R/zzz.R: -------------------------------------------------------------------------------- 1 | core <- c("DALEX", "iBreakDown", "ingredients", "auditor") 2 | 3 | .onAttach <- function(...) { 4 | DrWhy_logo() 5 | packageStartupMessage("Welcome to DrWhy (version: ", utils::packageVersion("DrWhy"), ")") 6 | for (package in core) { 7 | packageStartupMessage(" - ",package," (version: ", utils::packageVersion(package), ")") 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Responsible Machine Learning 2 | 3 | *With Great Power Comes Great Responsibility*. 4 | Voltaire (well, maybe) 5 | 6 | How to develop machine learning models in a responsible manner? There are several topics worth considering: 7 | 8 | * **Effective**. Is the model good enough? Models with low performance should not be used because they can do more harm than good. Communicate the performance of the model in a language that the user understands. Remember that the models will work on a different dataset than the training one. Make sure to assess the performance on the target dataset. 9 | 10 | * **Transparent**. Does the user know what influences model predictions? Interpretability and explainability is important. If the model decisions affect us directly or indirectly, we should know where these decisions come from and how they can be changed. 11 | 12 | * **Fair**. Does the model discriminate on the basis of gender, age, race or other sensitive attribute? Direct or indirect? It should not! Discrimination can come in many faces. The model may give lower scores, may have lower performance, or may be based on different variables for the protected population. 13 | 14 | * **Secure**. Do not let your model be hacked. Every complex system has its vulnerabilities. Seek them out and fix them. Some users may use various tricks to pull model predictions onto their site. 15 | 16 | * **Confidential**. Models are often built on sensitive data. Make sure that the data does not leak, so that sensitive attributes are not shared with unauthorized persons. Also beware of model leaks. 17 | 18 | * **Reproducible**. Usually the model development process consists of many steps. Make sure that they are completely reproducible and thus can be verified one by one. 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | # Collection of tools for Visual Exploration, Explanation and Debugging of Predictive Models 27 | 28 | *It takes a village to raise a child model*. 29 | 30 | The way how we do predictive modeling is very ineffective. We spend way too much time on manual time-consuming and easy to automate activities like data cleaning and exploration, crisp modeling, model validation. We should be focusing more on model understanding, productisation and communication. 31 | 32 | Here are gathered tools that can be used to make out work more efficient through the whole model lifecycle. 33 | The unified grammar beyond DrWhy.AI universe is described in the [Explanatory Model Analysis: Explore, Explain and Examine Predictive Models](https://pbiecek.github.io/ema/) book. 34 | 35 | ## Lifecycle for Predictive Models 36 | 37 | The DrWhy is based on an unified [Model Development Process](https://github.com/ModelOriented/DrWhy/blob/master/images/ModelDevelopmentProcess.pdf) inspired by RUP. Find an overview in the diagram below. 38 | 39 | [![images/DALEXverse.png](images/DALEXverse.png)]( https://modeloriented.github.io/ModelDevelopmentProcess/ ) 40 | 41 | ## The DrWhy.AI family 42 | 43 | Packages in the `DrWhy.AI` family of models may be divided into four classes. 44 | 45 | * **Model adapters**. Predictive models created with different tools have different structures, and different interfaces. Model adapters create uniform wrappers. This way other packages may operate on models in an unified way. `DALEX` is a lightweight package with generic interface. `DALEXtra` is a package with extensions for heavyweight interfaces like `scikitlearn`, `h2o`, `mlr`. 46 | 47 | * **Model agnostic explainers**. These packages implement specific methods for model exploration. They can be applied to a single model or they can compare different models. `ingredients` implements variable specific techniques like Ceteris Paribus, Partial Dependency, Permutation based Feature Importance. `iBreakDown` implements techniques for variable attribution, like Break Down or SHAPley values. `auditor` implements techniques for model validation, residual diagnostic and performance diagnostic. 48 | 49 | * **Model specific explainers**. These packages implement model specific techniques. `randomForestExplainer` implements techniques for exploration of `randomForest` models. `EIX` implements techniques for exploration of gbm and xgboost models. `cr19` implements techniques for exploration of survival models. 50 | 51 | * **Automated exploration**. These packages combine series of model exploration techniques and produce an automated report of website for model exploration. `modelStudio` implements a dashboard generator for local and global interactive model exploration. `modelDown` implements a HTML website generator for global model cross comparison. 52 | 53 | [![images/grammar_of_explanations.png](images/grammar_of_explanations.png)]( https://drwhy.ai/ ) 54 | 55 | Here is a more detailed overview. 56 | 57 | -------------------- 58 | 59 | ### [DALEX](http://github.com/ModelOriented/DALEX) 60 | 61 | [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/DALEX)](https://cran.r-project.org/package=DALEX) [![Build Status](https://api.travis-ci.org/ModelOriented/DALEX.png)](https://travis-ci.org/ModelOriented/DALEX) [![Coverage 62 | Status](https://img.shields.io/codecov/c/github/ModelOriented/DALEX/master.svg)](https://codecov.io/github/ModelOriented/DALEX?branch=master)[![DrWhy-eXtrAI](https://img.shields.io/badge/DrWhy-BackBone-373589)](http://drwhy.ai/#BackBone) 63 | 64 | The DALEX package (Descriptive mAchine Learning EXplanations) helps to understand how complex models are working. The main function [explain](https://modeloriented.github.io/DALEX/reference/explain.html) creates a wrapper around a predictive model. Wrapped models may then be explored and compared with a collection of local and global explainers. Recent developments from the area of Interpretable Machine Learning/eXplainable Artificial Intelligence. 65 | 66 | DALEX wraps methods from other packages, i.e. 'pdp' (Greenwell 2017) , 'ALEPlot' (Apley 2018) , 'factorMerger' (Sitko and Biecek 2017) , 'breakDown' package (Staniak and Biecek 2018) , (Fisher at al. 2018) . 67 | 68 | Vignettes: 69 | 70 | * [General introduction: Survival on the RMS Titanic](https://modeloriented.github.io/DALEX/articles/vignette_titanic.html) 71 | 72 | -------------------- 73 | 74 | ### [DALEXtra](http://github.com/ModelOriented/DALEXtra) 75 | 76 | [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/DALEXtra)](https://cran.r-project.org/package=DALEXtra) [![Build Status](https://api.travis-ci.org/ModelOriented/DALEXtra.png)](https://travis-ci.org/ModelOriented/DALEXtra) [![Coverage 77 | Status](https://img.shields.io/codecov/c/github/ModelOriented/DALEXtra/master.svg)](https://codecov.io/github/ModelOriented/DALEXtra?branch=master) [![DrWhy-eXtrAI](https://img.shields.io/badge/DrWhy-BackBone-373589)](http://drwhy.ai/#BackBone) 78 | 79 | The `DALEXtra` package is an extension pack for [DALEX](https://modeloriented.github.io/DALEX) package. 80 | This package provides easy to use connectors for models created with scikitlearn, keras, H2O, mljar and mlr. 81 | 82 | Vignettes: 83 | 84 | * [General introduction: DALEX with scikitlearn models](https://raw.githack.com/pbiecek/DALEX_docs/master/vignettes/How_to_use_DALEXtra_to_explain_and_visualize_scikitlearn_models.html) 85 | 86 | -------------------- 87 | 88 | ### [survex](http://github.com/ModelOriented/survex) 89 | 90 | [![CRAN status](https://www.r-pkg.org/badges/version/survex)](https://cran.r-project.org/package=survex) [![R-CMD-check](https://github.com/ModelOriented/survex/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/ModelOriented/survex/actions/workflows/R-CMD-check.yaml) [![Coverage 91 | Status](https://img.shields.io/codecov/c/github/ModelOriented/survex/master.svg)](https://codecov.io/github/ModelOriented/survex?branch=master) [![DrWhy-eXtrAI](https://img.shields.io/badge/DrWhy-BackBone-373589)](http://drwhy.ai/#BackBone) 92 | 93 | The survex package provides model-agnostic explanations for machine learning survival models. It is based on the DALEX package. 94 | 95 | Due to a functional type of prediction, either in the form of survival function or cumulative hazard function, standard model-agnostic explanations cannot be applied directly to survival analysis machine learning models. The survex package contains implementations of explanation methods specific to survival analysis, as well as extensions of existing ones for classification or regression. 96 | 97 | Vignettes: 98 | 99 | * [Package usage](https://modeloriented.github.io/survex/articles/survex-usage.html) 100 | * [Creating custom explainers](https://modeloriented.github.io/survex/articles/custom-explainers.html) 101 | * [Integration with `mlr3proba`](https://modeloriented.github.io/survex/articles/mlr3proba-usage.html) 102 | 103 | -------------------- 104 | 105 | ### [ingredients](http://github.com/ModelOriented/ingredients) 106 | 107 | [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/ingredients)](https://cran.r-project.org/package=ingredients) [![Build Status](https://api.travis-ci.org/ModelOriented/ingredients.svg?branch=master)](https://travis-ci.org/ModelOriented/ingredients) [![Coverage 108 | Status](https://img.shields.io/codecov/c/github/ModelOriented/ingredients/master.svg)](https://codecov.io/github/ModelOriented/ingredients?branch=master) [![DrWhy-eXtrAI](https://img.shields.io/badge/DrWhy-eXtrAI-4378bf)](http://drwhy.ai/#eXtraAI) 109 | 110 | The `ingredients` package is a collection of tools for assessment of feature importance and feature effects. 111 | 112 | Key functions: `feature_importance()` for assessment of global level feature importance, `ceteris_paribus()` for calculation of the Ceteris Paribus / What-If Profiles, `partial_dependency()` for Partial Dependency Plots, `conditional_dependency()` for Conditional Dependency Plots also called M Plots, `accumulated_dependency()` for Accumulated Local Effects Plots, `cluster_profiles()` for aggregation of Ceteris Paribus Profiles, generic `print()` and `plot()` for better usability of selected explainers, generic `plotD3()` for interactive D3 based explanations, and generic `describe()` for explanations in natural language. 113 | 114 | 115 | Vignettes: 116 | 117 | * [General introduction: Survival on the RMS Titanic](https://modeloriented.github.io/ingredients/articles/vignette_titanic.html), 118 | * [Aspects importance](https://modeloriented.github.io/ingredients/articles/vignette_aspect_importance.html), 119 | * [Explanations in natural language](https://modeloriented.github.io/ingredients/articles/Describing-Explanations.html) 120 | 121 | -------------------- 122 | 123 | ### [iBreakDown](http://github.com/ModelOriented/iBreakDown) 124 | 125 | [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/iBreakDown)](https://cran.r-project.org/package=iBreakDown) [![Build Status](https://api.travis-ci.org/ModelOriented/iBreakDown.svg?branch=master)](https://travis-ci.org/ModelOriented/iBreakDown) [![Coverage 126 | Status](https://img.shields.io/codecov/c/github/ModelOriented/iBreakDown/master.svg)](https://codecov.io/github/ModelOriented/iBreakDown?branch=master) [![DrWhy-eXtrAI](https://img.shields.io/badge/DrWhy-eXtrAI-4378bf)](http://drwhy.ai/#eXtraAI) 127 | 128 | The `iBreakDown` package is a model agnostic tool for explanation of predictions from black boxes ML models. 129 | Break Down Table shows contributions of every variable to a final prediction. 130 | Break Down Plot presents variable contributions in a concise graphical way. 131 | SHAP (Shapley Additive Attributions) values are calculated as average from random Break Down profiles. 132 | This package works for binary classifiers as well as regression models. 133 | 134 | `iBreakDown` is a successor of the [breakDown](https://github.com/pbiecek/breakDown) package. It is faster (complexity O(p) instead of O(p^2)). It supports interactions and interactive explainers with D3.js plots. 135 | 136 | Vignettes: 137 | 138 | * [General introduction: Survival on the RMS Titanic](https://modeloriented.github.io/iBreakDown/articles/vignette_iBreakDown_titanic.html), 139 | * [Explanations in natural language](https://modeloriented.github.io/iBreakDown/articles/vignette_iBreakDown_description.html) 140 | 141 | -------------------- 142 | 143 | ### [auditor](http://github.com/ModelOriented/auditor) 144 | 145 | [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/auditor)](https://cran.r-project.org/package=auditor) [![Build Status](https://api.travis-ci.org/ModelOriented/auditor.svg?branch=master)](https://travis-ci.org/ModelOriented/auditor) [![Coverage 146 | Status](https://img.shields.io/codecov/c/github/ModelOriented/auditor/master.svg)](https://codecov.io/github/ModelOriented/auditor?branch=master) [![DrWhy-eXtrAI](https://img.shields.io/badge/DrWhy-eXtrAI-4378bf)](http://drwhy.ai/#eXtraAI) 147 | 148 | The `auditor` package is a tool for model-agnostic validation. Implemented techniques facilitate assessing and comparing the goodness of fit and performance of models. In addition, they may be used for the analysis of the similarity of residuals and for the identification of outliers and influential observations. The examination is carried out by diagnostic scores and visual verification. Due to the flexible and consistent grammar, it is simple to validate models of any classes. 149 | 150 | Learn more: 151 | 152 | * Preprint: [auditor: an R Package for Model-Agnostic Visual Validation and Diagnostic](https://arxiv.org/abs/1809.07763), 153 | * [List of implemented audits](https://github.com/ModelOriented/auditor#a-short-overview-of-plots) 154 | 155 | 156 | -------------------- 157 | 158 | ### [fairmodels](http://github.com/ModelOriented/fairmodels) 159 | 160 | [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/fairmodels)](https://cran.r-project.org/package=fairmodels) [![R build status](https://github.com/ModelOriented/fairmodels/workflows/R-CMD-check/badge.svg)](https://github.com/ModelOriented/fairmodels/actions) [![Codecov test coverage](https://codecov.io/gh/ModelOriented/fairmodels/branch/master/graph/badge.svg)](https://codecov.io/gh/ModelOriented/fairmodels?branch=master) [![DrWhy-eXtrAI](https://img.shields.io/badge/DrWhy-eXtrAI-4378bf)](http://drwhy.ai/#eXtraAI) 161 | 162 | Flexible tool for bias detection, visualization, and mitigation. Use models explained with [DALEX](https://modeloriented.github.io/DALEX/) and calculate fairness classification metrics based on confusion matrices using `fairness_check()` or try newly developed module for regression models using `fairness_check_regression()`. R package fairmodels allows to compare and gain information about various machine learning models. Mitigate bias with various pre-processing and post-processing techniques. *Make sure your models are classifying protected groups similarly*. 163 | 164 | Learn more: 165 | 166 | * [fairmodels website](https://fairmodels.drwhy.ai/) 167 | * Compas recidivism data use case: [Basic tutorial](https://modeloriented.github.io/fairmodels/articles/Basic_tutorial.html) 168 | * Bias mitigation techniques on Adult data: [Advanced tutorial](https://modeloriented.github.io/fairmodels/articles/Advanced_tutorial.html) 169 | 170 | 171 | -------------------- 172 | 173 | ### [vivo](http://github.com/ModelOriented/vivo) 174 | 175 | [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/vivo)](https://cran.r-project.org/package=vivo) [![Build Status](https://api.travis-ci.org/ModelOriented/vivo.svg?branch=master)](https://travis-ci.org/ModelOriented/vivo) [![Coverage 176 | Status](https://img.shields.io/codecov/c/github/ModelOriented/vivo/master.svg)](https://codecov.io/github/ModelOriented/vivo?branch=master) [![DrWhy-eXtrAI](https://img.shields.io/badge/DrWhy-eXtrAI-4378bf)](http://drwhy.ai/#eXtraAI) 177 | 178 | The `vivo` package helps to calculate instance level variable importance (measure of local sensitivity). The importance measure is based on Ceteris Paribus profiles and can be calculated in eight variants. Select the variant that suits your needs by setting parameters: `absolute_deviation`, `point` and `density`. 179 | 180 | Learn more: 181 | 182 | * [Intuition for Ceteris Paribus Oscillations](https://github.com/ModelOriented/vivo#intuition) 183 | 184 | -------------------- 185 | 186 | ### [randomForestExplainer](http://github.com/ModelOriented/randomForestExplainer) 187 | 188 | [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/randomForestExplainer)](https://cran.r-project.org/package=randomForestExplainer) [![Build Status](https://api.travis-ci.org/ModelOriented/randomForestExplainer.svg?branch=master)](https://travis-ci.org/ModelOriented/randomForestExplainer) [![Coverage 189 | Status](https://img.shields.io/codecov/c/github/ModelOriented/randomForestExplainer/master.svg)](https://codecov.io/github/ModelOriented/randomForestExplainer?branch=master) [![DrWhy-eXtrAI](https://img.shields.io/badge/DrWhy-eXtrAI-4378bf)](http://drwhy.ai/#eXtraAI) 190 | 191 | The `randomForestExplainer` package helps to understand what is happening inside a Random Forest model. This package helps to explore main effects and pairwise interactions, depth distribution, conditional responses and feature importance. 192 | 193 | Learn more: 194 | 195 | * Vignettes: [Boston data: Understanding random forests with randomForestExplainer](https://modeloriented.github.io/randomForestExplainer/articles/randomForestExplainer.html), [Glioblastoma data: Understanding random forests with randomForestExplainer](https://cdn.staticaly.com/gh/geneticsMiNIng/BlackBoxOpener/master/randomForestExplainer/inst/doc/randomForestExplainer.html) 196 | * [Cheatsheet](https://github.com/ModelOriented/randomForestExplainer/blob/master/materials/cheatsheet.pdf) 197 | 198 | -------------------- 199 | 200 | ### [xspliner](http://github.com/ModelOriented/xspliner) 201 | 202 | [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/xspliner)](https://cran.r-project.org/package=xspliner) [![Build Status](https://api.travis-ci.org/ModelOriented/xspliner.svg?branch=master)](https://travis-ci.org/ModelOriented/xspliner) [![Coverage 203 | Status](https://img.shields.io/codecov/c/github/ModelOriented/vivo/master.svg)](https://codecov.io/github/ModelOriented/xspliner?branch=master) [![DrWhy-eXtrAI](https://img.shields.io/badge/DrWhy-AutoMat-ae2c87)](http://drwhy.ai/#AutoMat) 204 | 205 | The `xspliner` package is a collection of tools for training interpretable surrogate ML models. The package helps to build simple, interpretable models that inherits informations provided by more complicated ones - resulting model may be treated as explanation of provided black box, that was supplied prior to the algorithm. Provided functionality offers graphical and statistical evaluation both for overall model and its components. 206 | 207 | -------------------- 208 | 209 | ### [shapper](http://github.com/ModelOriented/shapper) 210 | 211 | [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/shapper)](https://cran.r-project.org/package=shapper) [![Build Status](https://api.travis-ci.org/ModelOriented/shapper.svg?branch=master)](https://travis-ci.org/ModelOriented/shapper) [![Coverage 212 | Status](https://img.shields.io/codecov/c/github/ModelOriented/shapper/master.svg)](https://codecov.io/github/ModelOriented/shapper?branch=master) [![DrWhy-eXtrAI](https://img.shields.io/badge/DrWhy-eXtrAI-4378bf)](http://drwhy.ai/#eXtraAI) 213 | 214 | The `shapper` is an R wrapper of SHAP python library. 215 | It accesses python implementation through `reticulate` connector. 216 | 217 | 218 | -------------------- 219 | 220 | ### [drifter](http://github.com/ModelOriented/drifter) 221 | 222 | [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/drifter)](https://cran.r-project.org/package=drifter) [![Build Status](https://api.travis-ci.org/ModelOriented/drifter.svg?branch=master)](https://travis-ci.org/ModelOriented/drifter) [![Coverage 223 | Status](https://img.shields.io/codecov/c/github/ModelOriented/drifter/master.svg)](https://codecov.io/github/ModelOriented/drifter?branch=master)[![DrWhy-eXtrAI](https://img.shields.io/badge/DrWhy-eXtrAI-4378bf)](http://drwhy.ai/#eXtraAI) 224 | 225 | The `drifter` is an R package that identifies concept drift in model structure or in data structure. 226 | 227 | Machine learning models are often fitted and validated on historical data under an assumption that data are stationary. The most popular techniques for validation (k-fold cross-validation, repeated cross-validation, and so on) test models on data with the same distribution as training data. 228 | 229 | Yet, in many practical applications, deployed models are working in a changing environment. After some time, due to changes in the environment, model performance may degenerate, as model may be less reliable. 230 | 231 | Concept drift refers to the change in the data distribution or in the relationships between variables over time. Think about model for energy consumption for a school, over time the school may be equipped with larger number of devices of with more power-efficient devices that may affect the model performance. 232 | 233 | 234 | -------------------- 235 | 236 | ### [EIX](http://github.com/ModelOriented/EIX) 237 | 238 | [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/EIX)](https://cran.r-project.org/package=EIX) [![Build Status](https://api.travis-ci.org/ModelOriented/EIX.svg?branch=master)](https://travis-ci.org/ModelOriented/EIX) [![Coverage 239 | Status](https://img.shields.io/codecov/c/github/ModelOriented/EIX/master.svg)](https://codecov.io/github/ModelOriented/EIX?branch=master) [![DrWhy-eXtrAI](https://img.shields.io/badge/DrWhy-eXtrAI-4378bf)](http://drwhy.ai/#eXtraAI) 240 | 241 | The `EIX` package implements set of techniques to explore and explain `XGBoost` and `LightGBM` models. Main functions of this package cover various variable importance measures and well as functions for identification of interactions between variables. 242 | 243 | Learn more: 244 | 245 | * [Cheatsheet](https://github.com/ModelOriented/EIX#cheatsheets) 246 | 247 | -------------------- 248 | 249 | ### [modelStudio](http://github.com/ModelOriented/modelStudio) 250 | 251 | [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/modelStudio)](https://cran.r-project.org/package=modelStudio) [![Build Status](https://api.travis-ci.org/ModelOriented/modelStudio.svg?branch=master)](https://travis-ci.org/ModelOriented/modelStudio) [![Coverage 252 | Status](https://img.shields.io/codecov/c/github/ModelOriented/modelStudio/master.svg)](https://codecov.io/github/ModelOriented/modelStudio?branch=master) [![DrWhy-eXtrAI](https://img.shields.io/badge/DrWhy-AutoMat-ae2c87)](http://drwhy.ai/#AutoMat) 253 | 254 | The `modelStudio` package **automates the explanatory analysis of machine learning predictive models**. It generates advanced interactive model explanations in the form of a **serverless HTML site** with only one line of code. This tool is model-agnostic, therefore compatible with most of the black-box predictive models and frameworks (e.g. `mlr/mlr3`, `xgboost`, `caret`, `h2o`, `parsnip`, `tidymodels`, `scikit-learn`, `lightgbm`, `keras/tensorflow`). 255 | 256 | The main `modelStudio()` function computes various (instance and model-level) explanations and produces a **customisable dashboard**, which consists of multiple panels for plots with their short descriptions. Easily **save**  the dashboard and **share** it with others. Tools for [Explanatory Model Analysis](https://ema.drwhy.ai/) unite with tools for Exploratory Data Analysis to give a broad overview of the model behavior. 257 | 258 | Learn more: 259 | 260 | * [Getting started](https://modeloriented.github.io/modelStudio/#demo) 261 | * [Vignette: perks and features](https://modelstudio.drwhy.ai/articles/ms-perks-features.html) 262 | * [JOSS paper: Interactive Studio with Explanations for ML Predictive Models](https://joss.theoj.org/papers/10.21105/joss.01798) 263 | 264 | -------------------- 265 | 266 | ### [arenar](https://github.com/ModelOriented/arenar) 267 | 268 | [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/arenar)](https://cran.r-project.org/package=arenar) [![R build status](https://github.com/ModelOriented/ArenaR/workflows/R-CMD-check/badge.svg)](https://github.com/ModelOriented/ArenaR/actions) [![Codecov test coverage](https://codecov.io/gh/ModelOriented/ArenaR/branch/master/graph/badge.svg)](https://codecov.io/gh/ModelOriented/ArenaR?branch=master) [![DrWhy-eXtrAI](https://img.shields.io/badge/DrWhy-AutoMat-ae2c87)](http://drwhy.ai/#AutoMat) 269 | 270 | Arena is an interactive tool that allows you to explore and compare any model regardless of its internal structure. 271 | 272 | The `arenar` package can be run in two modes - live (R runs in the background and calculates all necessary explanations) and serverless (all necessary explanations are calculated earlier). 273 | 274 | Using the Arena is trivially simple. Examples with different levels of advancement are available: 275 | 276 | * [Arena website](http://arenar.drwhy.ai/) 277 | * [arenar documentation](https://arenar.drwhy.ai/) 278 | 279 | -------------------- 280 | 281 | ### [modelDown](http://github.com/ModelOriented/modelDown) 282 | 283 | [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/modelDown)](https://cran.r-project.org/package=modelDown) [![Build Status](https://api.travis-ci.org/ModelOriented/modelDown.svg?branch=master)](https://travis-ci.org/ModelOriented/modelDown) [![Coverage 284 | Status](https://img.shields.io/codecov/c/github/ModelOriented/modelDown/master.svg)](https://codecov.io/github/ModelOriented/modelDown?branch=master) [![DrWhy-eXtrAI](https://img.shields.io/badge/DrWhy-AutoMat-ae2c87)](http://drwhy.ai/#AutoMat) 285 | 286 | The`modelDown` package generates a website with HTML summaries for predictive models. Is uses `DALEX` explainers to compute and plot summaries of how given models behave. We can see how well models behave (*Model Performance*, *Auditor*), how much each variable contributes to predictions (*Variable Response*) and which variables are the most important for a given model (*Variable Importance*). We can also compare Concept Drift for pairs of models (*Drifter*). Additionally, data available on the website can be easily recreated in current R session (using `archivist` package). 287 | 288 | Learn more: 289 | 290 | * [Getting started](https://modeloriented.github.io/modelDown/getting-started) 291 | * [JOSS paper: modelDown: automated website generator with interpretable documentation for predictive machine learning models](https://joss.theoj.org/papers/10.21105/joss.01444) 292 | 293 | -------------------- 294 | 295 | ### [rSAFE](http://github.com/ModelOriented/rSAFE) 296 | 297 | [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/rSAFE)](https://cran.r-project.org/package=rSAFE) [![Build Status](https://api.travis-ci.org/ModelOriented/rSAFE.svg?branch=master)](https://travis-ci.org/ModelOriented/rSAFE) [![Coverage 298 | Status](https://img.shields.io/codecov/c/github/ModelOriented/rSAFE/master.svg)](https://codecov.io/github/ModelOriented/rSAFE?branch=master)[![DrWhy-eXtrAI](https://img.shields.io/badge/DrWhy-AutoMat-ae2c87)](http://drwhy.ai/#AutoMat) 299 | 300 | The `rSAFE` package is a model agnostic tool for making an interpretable white-box model more accurate using alternative black-box model called surrogate model. Based on the complicated model, such as neural network or random forest, new features are being extracted and then used in the process of fitting a simpler interpretable model, improving its overall performance. 301 | 302 | Learn more: 303 | 304 | * article [Simpler is better: Lifting interpretability-performance trade-off via automated feature engineering](https://www.sciencedirect.com/science/article/pii/S016792362100066X) 305 | * package [website](https://modeloriented.github.io/rSAFE/) 306 | 307 | -------------------- 308 | 309 | ### [EloML](http://github.com/ModelOriented/EloML) 310 | 311 | [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/EloML)](https://cran.r-project.org/package=EloML) [![Build Status](https://api.travis-ci.org/ModelOriented/EloML.svg?branch=master)](https://travis-ci.org/ModelOriented/EloML) [![Coverage 312 | Status](https://img.shields.io/codecov/c/github/ModelOriented/EloML/master.svg)](https://codecov.io/github/ModelOriented/EloML?branch=master) [![DrWhy-AutoMat](https://img.shields.io/badge/DrWhy-AutoMat-373589)](http://drwhy.ai/#AutoMat) 313 | 314 | The `EloML` package provides Elo rating system for machine learning models. Elo Predictive Power (EPP) score helps to assess model performance based Elo ranking system. 315 | 316 | Learn more: 317 | 318 | * [arxiv](https://arxiv.org/abs/1908.09213) 319 | 320 | 321 | -------------------- 322 | 323 | ### [archivist](http://github.com/pbiecek/archivist) 324 | 325 | [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/archivist)](https://cran.r-project.org/package=archivist) [![Build Status](https://api.travis-ci.org/pbiecek/archivist.svg?branch=master)](https://travis-ci.org/pbiecek/archivist) [![Coverage 326 | Status](https://img.shields.io/codecov/c/github/pbiecek/archivist/master.svg)](https://codecov.io/github/pbiecek/archivist?branch=master) [![DrWhy-eXtrAI](https://img.shields.io/badge/DrWhy-BackBone-373589)](http://drwhy.ai/#BackBone) 327 | 328 | The `archivist` package automate serialization and deserialization of R objects. Objects are stored with additional metadata to facilitate reproducibility and governance of data science projects. 329 | 330 | Everything that exists in R is an object. `archivist` is an R package that stores copies of all objects along with their metadata. It helps to manage and recreate objects with final or partial results from data analysis. Use `archivist` to record every result, to share these results with future you or with others, to search through repository of objects created in the past but needed now. 331 | 332 | Learn more: 333 | 334 | * [Cheatsheet](https://github.com/pbiecek/archivist/raw/master/cheatsheets/archivistCheatsheet.png) 335 | * [JSS article](http://doi.org/10.18637/jss.v082.i11) 336 | 337 | 338 | -------------------- 339 | 340 | 341 | Tools that are useful during the model lifetime. ![MI2](images/mi2.svg) stands for our internal tools. 342 | 343 | ### 1. Data preparation 344 | 345 | * [dataMaid](https://cran.r-project.org/web/packages/dataMaid/index.html); A Suite of Checks for Identification of Potential Errors in a Data Frame as Part of the Data Screening Process 346 | * [inspectdf](https://cran.r-project.org/web/packages/inspectdf/index.html); A collection of utilities for columnwise summary, comparison and visualisation of data frames. 347 | * [validate](https://github.com/data-cleaning/validate); Professional data validation for the R environment 348 | * [errorlocate](https://github.com/data-cleaning/errorlocate); Find and replace erroneous fields in data using validation rules 349 | * [ggplot2](https://ggplot2.tidyverse.org/); System for declaratively creating graphics, based on The Grammar of Graphics. 350 | 351 | ### 2. Data understanding 352 | 353 | * Model Agnostic Variable Importance Scores. Surrogate learning = Train an elastic model and measure feature importance in such model. See [DALEX](https://github.com/pbiecek/DALEX/), [Model Class Reliance MCR](https://arxiv.org/abs/1801.01489) 354 | * [vip](https://github.com/koalaverse/vip) Variable importance plots 355 | * [SAFE](https://github.com/MI2DataLab/SAFE) ![MI2](images/mi2.svg) Surrogate learning = Train an elastic model and extract feature transformations. 356 | * [xspliner](https://github.com/ModelOriented/xspliner) ![MI2](images/mi2.svg) Using surrogate black-boxes to train interpretable spline based additive models 357 | * [factorMerger](https://github.com/MI2DataLab/factorMerger) ![MI2](images/mi2.svg) Set of tools for factors merging [paper](https://arxiv.org/abs/1709.04412) 358 | * [ingredients](https://github.com/ModelOriented/ingredients) ![MI2](images/mi2.svg) Set of tools for model level feature effects and feature importance. 359 | 360 | ### 4. Model assembly 361 | 362 | * [mlr](https://github.com/mlr-org/mlr) Machine Learning in R [paper](http://jmlr.org/papers/v17/15-066.html) 363 | * [caret](https://github.com/topepo/caret) Classification And Regression Training [paper](https://www.jstatsoft.org/article/view/v028i05) 364 | 365 | ### 5. Model audit 366 | 367 | * [auditor](https://github.com/MI2DataLab/auditor) ![MI2](images/mi2.svg) model verification, validation, and error analysis [vigniette](https://mi2datalab.github.io/auditor/articles/model_performance_audit.html) 368 | * [DALEX](https://github.com/pbiecek/DALEX/) ![MI2](images/mi2.svg) Descriptive mAchine Learning EXplanations 369 | * [iml](https://github.com/christophM/iml); interpretable machine learning R package 370 | * [randomForestExplainer](https://github.com/MI2DataLab/randomForestExplainer) ![MI2](images/mi2.svg) A set of tools to understand what is happening inside a Random Forest 371 | * [survxai](https://github.com/MI2DataLab/survxai) ![MI2](images/mi2.svg) Explanations for survival models [paper](http://joss.theoj.org/papers/dcc9d53e8a1b1f613d59b9658b113fff) 372 | 373 | ### 6. Model delivery 374 | 375 | * [iBreakDown](https://github.com/ModelOriented/iBreakDown), [pyBreakDown](https://github.com/MI2DataLab/pyBreakDown) ![MI2](images/mi2.svg) Model Agnostic Explainers for Individual Predictions (with interactions) 376 | * [ceterisParibus](https://github.com/pbiecek/ceterisParibus), [pyCeterisParibus](https://github.com/ModelOriented/pyCeterisParibus), [ceterisParibusD3](https://github.com/MI2DataLab/ceterisParibusExt/tree/master/ceterisParibusD3) and [ingredients](https://github.com/ModelOriented/ingredients) ![MI2](images/mi2.svg) Ceteris Paribus Plots (What-If plots) for explanations of a single observation 377 | * [localModel](https://github.com/ModelOriented/localModel) and [live](https://github.com/MI2DataLab/live/) ![MI2](images/mi2.svg) 378 | LIME-like explanations with interpretable features based on Ceteris Paribus curves. 379 | * [lime](https://github.com/thomasp85/lime); Local Interpretable Model-Agnostic Explanations (R port of original Python package) 380 | * [shapper](https://github.com/ModelOriented/shapper) ![MI2](images/mi2.svg) An R wrapper of SHAP python library 381 | * [modelDown](https://github.com/ModelOriented/modelDown) ![MI2](images/mi2.svg) modelDown generates a website with HTML summaries for predictive models 382 | * [modelStudio](https://github.com/ModelOriented/modelStudio) ![MI2](images/mi2.svg) modelStudio generates an interactive dashboard with D3 based summaries for predictive models 383 | * [drifter](https://github.com/ModelOriented/drifter) ![MI2](images/mi2.svg) Concept Drift and Concept Shift Detection for Predictive Models 384 | * [archivist](https://github.com/pbiecek/archivist) ![MI2](images/mi2.svg) A set of tools for datasets and plots archiving [paper](http://doi.org/10.18637/jss.v082.i11) 385 | 386 | 387 | ## Family of Model Explainers 388 | 389 | ![images/DrWhyAI.png](images/DrWhyAI.png) 390 | 391 | 392 | ## Architecture of DrWhy 393 | 394 | `DrWhy` works on fully trained predictive models. Models can be created with any tool. 395 | 396 | `DrWhy` uses `DALEX` package to wrap model with additional metadata required for explanations, like validation data, predict function etc. 397 | 398 | Explainers for predictive models can be created with model agnostic or model specific functions implemented in various packages. 399 | 400 | ![Hype_Cycle](images/Hype_Cycle.svg) 401 | 402 | -------------------------------------------------------------------------------- /_pkgdown.yml: -------------------------------------------------------------------------------- 1 | template: 2 | package: DrWhyTemplate 3 | default_assets: false 4 | -------------------------------------------------------------------------------- /docs/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Page not found (404) • DrWhy 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 49 | 50 | 51 | 52 | 59 | 60 | 61 | 62 | 63 |
64 |
65 | 116 | 117 | 118 | 119 |
120 | 121 |
122 |
123 | 126 | 127 | Content not found. Please use links in the navbar. 128 | 129 |
130 | 131 |
132 | 133 | 134 | 135 |
136 |
137 |

138 | Developed by Przemyslaw Biecek. 139 | Site built by pkgdown. 140 |

141 |
142 | 143 |
144 |
145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | -------------------------------------------------------------------------------- /docs/MI2logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/docs/MI2logo.jpg -------------------------------------------------------------------------------- /docs/articles/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Articles • DrWhy 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 49 | 50 | 51 | 52 | 59 | 60 | 61 | 62 | 63 |
64 |
65 | 116 | 117 | 118 | 119 |
120 | 121 |
122 |
123 | 126 | 127 |
128 |

All vignettes

129 |

130 | 131 | 134 |
135 |
136 |
137 | 138 | 139 |
140 |
141 |

142 | Developed by Przemyslaw Biecek. 143 | Site built by pkgdown. 144 |

145 |
146 | 147 |
148 |
149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | -------------------------------------------------------------------------------- /docs/articles/manifesto.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | The DrWhy manifesto • DrWhy 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 26 | 27 | 28 |
29 |
81 | 82 | 83 | 84 | 85 |
86 |
87 | 97 | 98 | 99 | 100 |

I simply love the tidyverse manifesto written by Hadley Wickham.

101 |

Especially one point, that I believe is a key differentiator between DrWhy tools and many other tools for XAI.

102 |
103 |

104 | Design for humans

105 |

Copied from tidyverse manifesto

106 |

Design your API primarily so that it is easy to use by humans. Computer efficiency is a secondary concern because the bottleneck in most data analysis is thinking time, not computing time.

107 |
    108 |
  • Invest time in naming your functions. Evocative function names make your API easier to use and remember.

  • 109 |
  • Favour explicit, lengthy names, over short, implicit, names. Save the shortest names for the most important operations.

  • 110 |
  • Think about how autocomplete can also make an API that’s easy to write. Make sure that function families are identified by a common prefix, not a common suffix. This makes autocomplete more helpful, as you can jog your memory with the prompts. For smaller packages, this may mean that every function has a common prefix (e.g. stringr, xml2, rvest).

  • 111 |
112 |
113 |
114 | 115 | 124 | 125 |
126 | 127 | 128 | 129 |
130 |

131 | Developed by Przemyslaw Biecek. 132 | Site built by pkgdown. 133 |

134 |
135 | 136 |
137 |
138 | 139 | 140 | 141 | 142 | 143 | 144 | -------------------------------------------------------------------------------- /docs/authors.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Authors • DrWhy 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 49 | 50 | 51 | 52 | 59 | 60 | 61 | 62 | 63 |
64 |
65 | 116 | 117 | 118 | 119 |
120 | 121 |
122 |
123 | 126 | 127 |
    128 |
  • 129 |

    Przemyslaw Biecek. Author, maintainer. ORCID 130 |

    131 |
  • 132 |
133 | 134 |
135 | 136 |
137 | 138 | 139 | 140 |
141 |
142 |

143 | Developed by Przemyslaw Biecek. 144 | Site built by pkgdown. 145 |

146 |
147 | 148 |
149 |
150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | -------------------------------------------------------------------------------- /docs/dalexverse-2.css: -------------------------------------------------------------------------------- 1 | body {font-size: 16px; 2 | padding-top: 60px; 3 | } 4 | h1 {font-size: 40px; 5 | font-weight: 500; 6 | } 7 | h2 {font-size: 30px; 8 | font-weight: 500; 9 | } 10 | h3 {font-size: 23px; 11 | font-weight: 500; 12 | } 13 | 14 | 15 | .ref-arguments th {vertical-align: top;} 16 | 17 | /* navbar ----------------------------------------------- */ 18 | 19 | 20 | .navbar .info { 21 | color: #fff; 22 | float: left; 23 | height: 50px; 24 | width: 330px; 25 | font-size: 80%; 26 | position: relative; 27 | margin-left: 5px; 28 | } 29 | 30 | .navbar .info .partof .a { 31 | color: #7abaf5 !important; 32 | } 33 | 34 | .navbar .info .partof { 35 | position: absolute; 36 | top: 0; 37 | } 38 | 39 | .navbar .info .developedby { 40 | position: absolute; 41 | bottom: 0; 42 | right: 0; 43 | } 44 | 45 | .navbar .info .version { 46 | position: absolute; 47 | bottom: 0; 48 | } 49 | .navbar .info .version-danger { 50 | font-weight: bold; 51 | color: orange; 52 | } 53 | 54 | .navbar-form { 55 | margin-top: 3px; 56 | margin-bottom: 0; 57 | } 58 | 59 | .navbar-toggle { 60 | margin-top: 8px; 61 | margin-bottom: 5px; 62 | } 63 | 64 | .navbar-nav li a { 65 | padding-bottom: 10px; 66 | } 67 | .navbar-default .navbar-nav > .active > a, 68 | .navbar-default .navbar-nav > .active > a:hover, 69 | .navbar-default .navbar-nav > .active > a:focus { 70 | background-color: #370f54 !important; 71 | border-radius: 3px; 72 | } 73 | 74 | .nav-pils>li>a { 75 | position: relative; 76 | display: block; 77 | padding: 10px 15px; 78 | border-radius: 4px; 79 | } 80 | 81 | /* footer ------------------------------------------------ */ 82 | 83 | footer { 84 | margin-top: 45px; 85 | padding: 35px 0 36px; 86 | border-top: 1px solid #e5e5e5; 87 | 88 | display: flex; 89 | color: #666; 90 | } 91 | footer p { 92 | margin-bottom: 0; 93 | } 94 | footer .tidyverse { 95 | flex: 1; 96 | margin-right: 1em; 97 | } 98 | footer .author { 99 | flex: 1; 100 | text-align: left; 101 | } 102 | 103 | /* sidebar ------------------------------------------------ */ 104 | 105 | #sidebar h2 { 106 | font-size: 1.6em; 107 | margin-top: 1em; 108 | margin-bottom: 0.25em; 109 | } 110 | 111 | #sidebar .list-unstyled li { 112 | margin-bottom: 0.5em; 113 | line-height: 1.4; 114 | } 115 | 116 | #sidebar small { 117 | color: #777; 118 | } 119 | 120 | #sidebar .nav { 121 | padding-left: 0px; 122 | list-style-type: none; 123 | color: #5a9ddb; 124 | } 125 | 126 | #sidebar .nav > li.active { 127 | background-position: left -240px; 128 | } 129 | 130 | /*#sidebar a { 131 | padding: 0px; 132 | color: #5a9ddb; 133 | background-color: transparent; 134 | } 135 | */ 136 | /*#sidebar a:hover { 137 | background-color: transparent; 138 | text-decoration: underline; 139 | }*/ 140 | 141 | /* ---- *\/*----------------------------------*\ 142 | 143 | /* Sticker footer */ 144 | body > .container { 145 | display: flex; 146 | padding-top: 30px; 147 | min-height: calc(100vh); 148 | flex-direction: column; 149 | } 150 | 151 | /* Section anchors ---------------------------------*/ 152 | 153 | 154 | .hasAnchor:hover a.anchor { 155 | visibility: visible; 156 | } 157 | 158 | @media (max-width: 767px) { 159 | .hasAnchor:hover a.anchor { 160 | visibility: hidden; 161 | } 162 | } 163 | 164 | 165 | /* Static header placement on mobile devices */ 166 | @media (max-width: 767px) { 167 | .navbar-fixed-top { 168 | position: absolute; 169 | } 170 | .navbar { 171 | padding: 0; 172 | } 173 | } 174 | 175 | 176 | /* Syntax highlighting ---------------------------------------------------- */ 177 | 178 | 179 | table { 180 | display: block; 181 | overflow: auto; 182 | width: 100% !important; 183 | } 184 | 185 | .navbar-mi2logo { 186 | float: left; 187 | margin-right: 2px; 188 | margin-left: 2px; 189 | margin-bottom: 2px; 190 | margin-top: 2px; 191 | } 192 | 193 | .sidebar-logo { 194 | display:block; 195 | margin-left:auto; 196 | margin-right:auto; 197 | text-align: justify; 198 | } 199 | -------------------------------------------------------------------------------- /docs/drwhy_znak_violet.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/docs/drwhy_znak_violet.jpg -------------------------------------------------------------------------------- /docs/drwhy_znak_violet_small.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/docs/drwhy_znak_violet_small.jpg -------------------------------------------------------------------------------- /docs/drwhylogo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/docs/drwhylogo.jpg -------------------------------------------------------------------------------- /docs/images/DALEXverse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/docs/images/DALEXverse.png -------------------------------------------------------------------------------- /docs/images/DrWhy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/docs/images/DrWhy.png -------------------------------------------------------------------------------- /docs/images/DrWhyAI.key: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/docs/images/DrWhyAI.key -------------------------------------------------------------------------------- /docs/images/DrWhyAI.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/docs/images/DrWhyAI.pdf -------------------------------------------------------------------------------- /docs/images/DrWhyAI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/docs/images/DrWhyAI.png -------------------------------------------------------------------------------- /docs/images/Hype_Cycle.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 10 | 11 | 12 | 14 | 15 | 16 | Hype Cycle for Predictive Models 17 | Time 18 | I need a predictive model! 19 | Wow, ML is so easy!! 20 | OMG, my model is not working 21 | on new data!!! 22 | I need to understand the model 23 | I need to use DrWhy!!!! 24 | 25 | -------------------------------------------------------------------------------- /docs/images/ModelDevelopmentProcess.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/docs/images/ModelDevelopmentProcess.pdf -------------------------------------------------------------------------------- /docs/images/diagramMDP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/docs/images/diagramMDP.png -------------------------------------------------------------------------------- /docs/images/family.ai: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/docs/images/family.ai -------------------------------------------------------------------------------- /docs/images/family.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/docs/images/family.png -------------------------------------------------------------------------------- /docs/images/grammar_of_explanations.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/docs/images/grammar_of_explanations.png -------------------------------------------------------------------------------- /docs/images/local_attributions_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/docs/images/local_attributions_1.jpg -------------------------------------------------------------------------------- /docs/images/local_attributions_1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/docs/images/local_attributions_1.pdf -------------------------------------------------------------------------------- /docs/images/local_attributions_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/docs/images/local_attributions_2.jpg -------------------------------------------------------------------------------- /docs/images/local_attributions_2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/docs/images/local_attributions_2.pdf -------------------------------------------------------------------------------- /docs/images/local_interactions_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/docs/images/local_interactions_1.jpg -------------------------------------------------------------------------------- /docs/images/local_interactions_1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/docs/images/local_interactions_1.pdf -------------------------------------------------------------------------------- /docs/images/local_profile_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/docs/images/local_profile_1.jpg -------------------------------------------------------------------------------- /docs/images/local_profile_1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/docs/images/local_profile_1.pdf -------------------------------------------------------------------------------- /docs/images/mi2.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 28 | 41 | 49 | 53 | 57 | 59 | 61 | 70 | 72 | 74 | 76 | 78 | 80 | 83 | 85 | 87 | 89 | 90 | MI 91 | 92 | -------------------------------------------------------------------------------- /docs/images/misc1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/docs/images/misc1.png -------------------------------------------------------------------------------- /docs/images/misc2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/docs/images/misc2.jpg -------------------------------------------------------------------------------- /docs/images/misc3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/docs/images/misc3.jpg -------------------------------------------------------------------------------- /docs/images/misc4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/docs/images/misc4.jpg -------------------------------------------------------------------------------- /docs/images/misc5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/docs/images/misc5.jpg -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Explain, Explore and Debug Predictive Machine Learning Models • DrWhy 9 | 10 | 11 | 12 | 13 | 14 | 19 | 20 | 30 | 31 | 32 |
33 |
85 | 86 | 87 | 88 | 89 |
90 |
91 |
92 | 94 |

It takes a village to raise a child model.

95 |

The way how we do predictive modeling is very ineffective. We spend way too much time on manual time consuming and easy to automate activities like data cleaning and exploration, crisp modeling, model validation. Instead of focusing on model understanding, productisation and communication.

96 |

Here we gather tools that can be use to make out work more efficient through the whole model lifecycle. The unified grammar beyond DrWhy.AI universe is described in the Predictive Models: Visual Exploration, Explanation and Debugging book.

97 |
98 |

99 | Lifecycle for Predictive Models

100 |

The DrWhy is based on an unified Model Development Process inspired by RUP. Find an overview in the diagram below.

101 |

images/DALEXverse.png

102 |
103 |
104 |

105 | The DrWhy.AI family

106 |

Packages in the DrWhy.AI family of models may be divided into four classes.

107 |
    108 |
  • Model adapters. Predictive models created with different tools have different structures, and different interfaces. Model adapters create uniform wrappers. This way other packages may operate on models in an unified way. DALEX is a lightweight package with generic interface. DALEXtra is a package with extensions for heavyweight interfaces like scikitlearn, h2o, mlr.

  • 109 |
  • Model agnostic explainers. These packages implement specific methods for model exploration. They can be applied to a single model or they can compare different models. ingredients implements variable specific techniques like Ceteris Paribus, Partial Dependency, Permutation based Feature Importance. iBreakDown implements techniques for variable attribution, like Break Down or SHAPley values. auditor implements techniques for model validation, residual diagnostic and performance diagnostic.

  • 110 |
  • Model specific explainers. These packages implement model specific techniques. randomForestExplainer implements techniques for exploration of randomForest models. EIX implements techniques for exploration of gbm and xgboost models. cr19 implements techniques for exploration of survival models.

  • 111 |
  • Automated exploration. These packages combine series of model exploration techniques and produce an automated report of website for model exploration. modelStudio implements a dashboard generator for local and global interactive model exploration. modelDown implements a HTML website generator for global model cross comparison.

  • 112 |
113 |

images/grammar_of_explanations.png

114 |

Here is a more detailed overview.

115 |
116 |
117 |

118 | DALEX 119 |

120 |

CRAN_Status_Badge Build Status Coverage StatusDrWhy-eXtrAI

121 |

The DALEX package (Descriptive mAchine Learning EXplanations) 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 developments from the area of Interpretable Machine Learning/eXplainable Artificial Intelligence.

122 |

DALEX wraps methods from other packages, i.e. ‘pdp’ (Greenwell 2017) doi:10.32614/RJ-2017-016, ‘ALEPlot’ (Apley 2018) <arXiv:1612.08468>, ‘factorMerger’ (Sitko and Biecek 2017) <arXiv:1709.04412>, ‘breakDown’ package (Staniak and Biecek 2018) doi:10.32614/RJ-2018-072, (Fisher at al. 2018) <arXiv:1801.01489>.

123 |

Vignettes:

124 | 127 |
128 |
129 |
130 |

131 | DALEXtra 132 |

133 |

CRAN_Status_Badge Build Status Coverage Status DrWhy-eXtrAI

134 |

The DALEXtra package is an extension pack for DALEX package. This package provides easy to use connectors for models created with scikitlearn, keras, H2O, mljar and mlr.

135 |

Vignettes:

136 | 139 |
140 |
141 |
142 |

143 | ingredients 144 |

145 |

CRAN_Status_Badge Build Status Coverage Status DrWhy-eXtrAI

146 |

The ingredients package is a collection of tools for assessment of feature importance and feature effects.

147 |

Key functions: feature_importance() for assessment of global level feature importance, ceteris_paribus() for calculation of the Ceteris Paribus / What-If Profiles, partial_dependency() for Partial Dependency Plots, conditional_dependency() for Conditional Dependency Plots also called M Plots, accumulated_dependency() for Accumulated Local Effects Plots, cluster_profiles() for aggregation of Ceteris Paribus Profiles, generic print() and plot() for better usability of selected explainers, generic plotD3() for interactive D3 based explanations, and generic describe() for explanations in natural language.

148 |

Vignettes:

149 | 156 |
157 |
158 |
159 |

160 | iBreakDown 161 |

162 |

CRAN_Status_Badge Build Status Coverage Status DrWhy-eXtrAI

163 |

The iBreakDown package is a model agnostic tool for explanation of predictions from black boxes ML models. Break Down Table shows contributions of every variable to a final prediction. Break Down Plot presents variable contributions in a concise graphical way. SHAP (Shapley Additive Attributions) values are calculated as average from random Break Down profiles. This package works for binary classifiers as well as regression models.

164 |

iBreakDown is a successor of the breakDown package. It is faster (complexity O(p) instead of O(p^2)). It supports interactions and interactive explainers with D3.js plots.

165 |

Vignettes:

166 | 171 |
172 |
173 |
174 |

175 | auditor 176 |

177 |

CRAN_Status_Badge Build Status Coverage Status DrWhy-eXtrAI

178 |

The auditor package is a tool for model-agnostic validation. Implemented techniques facilitate assessing and comparing the goodness of fit and performance of models. In addition, they may be used for the analysis of the similarity of residuals and for the identification of outliers and influential observations. The examination is carried out by diagnostic scores and visual verification. Due to the flexible and consistent grammar, it is simple to validate models of any classes.

179 |

Learn more:

180 | 184 |
185 |
186 |
187 |

188 | vivo 189 |

190 |

CRAN_Status_Badge Build Status Coverage Status DrWhy-eXtrAI

191 |

The vivo package helps to calculate instance level variable importance (measure of local sensitivity). The importance measure is based on Ceteris Paribus profiles and can be calculated in eight variants. Select the variant that suits your needs by setting parameters: absolute_deviation, point and density.

192 |

Learn more:

193 | 196 |
197 |
198 |
199 |

200 | randomForestExplainer 201 |

202 |

CRAN_Status_Badge Build Status Coverage Status DrWhy-eXtrAI

203 |

The randomForestExplainer package helps to understand what is happening inside a Random Forest model. This package helps to explore main effects and pairwise interactions, depth distribution, conditional responses and feature importance.

204 |

Learn more:

205 | 210 |
211 |
212 |
213 |

214 | rSAFE 215 |

216 |

CRAN_Status_Badge Build Status Coverage StatusDrWhy-eXtrAI

217 |

The rSAFE package is a model agnostic tool for making an interpretable white-box model more accurate using alternative black-box model called surrogate model. Based on the complicated model, such as neural network or random forest, new features are being extracted and then used in the process of fitting a simpler interpretable model, improving its overall performance.

218 |
219 |
220 |
221 |

222 | xspliner 223 |

224 |

CRAN_Status_Badge Build Status Coverage Status DrWhy-eXtrAI

225 |

The xspliner package is a collection of tools for training interpretable surrogate ML models. The package helps to build simple, interpretable models that inherits informations provided by more complicated ones - resulting model may be treated as explanation of provided black box, that was supplied prior to the algorithm. Provided functionality offers graphical and statistical evaluation both for overall model and its components.

226 |
227 |
228 |
229 |

230 | shapper 231 |

232 |

CRAN_Status_Badge Build Status Coverage Status DrWhy-eXtrAI

233 |

The shapper is an R wrapper of SHAP python library. It accesses python implementation through reticulate connector.

234 |
235 |
236 |
237 |

238 | drifter 239 |

240 |

CRAN_Status_Badge Build Status Coverage StatusDrWhy-eXtrAI

241 |

The drifter is an R package that identifies concept drift in model structure or in data structure.

242 |

Machine learning models are often fitted and validated on historical data under an assumption that data are stationary. The most popular techniques for validation (k-fold cross-validation, repeated cross-validation, and so on) test models on data with the same distribution as training data.

243 |

Yet, in many practical applications, deployed models are working in a changing environment. After some time, due to changes in the environment, model performance may degenerate, as model may be less reliable.

244 |

Concept drift refers to the change in the data distribution or in the relationships between variables over time. Think about model for energy consumption for a school, over time the school may be equipped with larger number of devices of with more power-efficient devices that may affect the model performance.

245 |
246 |
247 |
248 |

249 | EIX 250 |

251 |

CRAN_Status_Badge Build Status Coverage Status DrWhy-eXtrAI

252 |

The EIX package implements set of techniques to explore and explain XGBoost and LightGBM models. Main functions of this package cover various variable importance measures and well as functions for identification of interactions between variables.

253 |

Learn more:

254 | 257 |
258 |
259 |
260 |

261 | modelStudio 262 |

263 |

CRAN_Status_Badge Build Status Coverage Status DrWhy-eXtrAI

264 |

The modelStudio package automates the Explanatory Analysis of Machine Learning predictive models. Generate advanced interactive and animated model explanations in the form of a serverless HTML site with only one line of code.

265 |

The main modelStudio() function computes various (instance and dataset level) model explanations and produces an interactive, customisable dashboard made with D3.js. It consists of multiple panels for plots with their short descriptions. Easily save and share the dashboard with others. Tools for model exploration unite with tools for EDA (Exploratory Data Analysis) to give a broad overview of the model behavior.

266 |

Learn more:

267 | 272 |
273 |
274 |
275 |

276 | modelDown 277 |

278 |

CRAN_Status_Badge Build Status Coverage Status DrWhy-eXtrAI

279 |

ThemodelDown package generates a website with HTML summaries for predictive models. Is uses DALEX explainers to compute and plot summaries of how given models behave. We can see how well models behave (Model Performance, Auditor), how much each variable contributes to predictions (Variable Response) and which variables are the most important for a given model (Variable Importance). We can also compare Concept Drift for pairs of models (Drifter). Additionally, data available on the website can be easily recreated in current R session (using archivist package).

280 |

Learn more:

281 | 285 |
286 |
287 |
288 |

289 | EloML 290 |

291 |

CRAN_Status_Badge Build Status Coverage Status DrWhy-AutoMat

292 |

The EloML package provides Elo rating system for machine learning models. Elo Predictive Power (EPP) score helps to assess model performance based Elo ranking system.

293 |

Learn more:

294 | 297 |
298 |
299 |
300 |

301 | archivist 302 |

303 |

CRAN_Status_Badge Build Status Coverage Status DrWhy-eXtrAI

304 |

The archivist package automate serialization and deserialization of R objects. Objects are stored with additional metadata to facilitate reproducibility and governance of data science projects.

305 |

Everything that exists in R is an object. archivist is an R package that stores copies of all objects along with their metadata. It helps to manage and recreate objects with final or partial results from data analysis. Use archivist to record every result, to share these results with future you or with others, to search through repository of objects created in the past but needed now.

306 |

Learn more:

307 | 311 |
312 |

Tools that are useful during the model lifetime. MI2 stands for our internal tools.

313 |
314 |
315 |

316 | 1. Data preparation

317 |
    318 |
  • 319 | dataMaid; A Suite of Checks for Identification of Potential Errors in a Data Frame as Part of the Data Screening Process
  • 320 |
  • 321 | inspectdf; A collection of utilities for columnwise summary, comparison and visualisation of data frames.
  • 322 |
  • 323 | validate; Professional data validation for the R environment
  • 324 |
  • 325 | errorlocate; Find and replace erroneous fields in data using validation rules
  • 326 |
  • 327 | ggplot2; System for declaratively creating graphics, based on The Grammar of Graphics.
  • 328 |
329 |
330 |
331 |

332 | 2. Data understanding

333 |
    334 |
  • Model Agnostic Variable Importance Scores. Surrogate learning = Train an elastic model and measure feature importance in such model. See DALEX, Model Class Reliance MCR 335 |
  • 336 |
  • 337 | vip Variable importance plots
  • 338 |
  • 339 | SAFE MI2 Surrogate learning = Train an elastic model and extract feature transformations.
  • 340 |
  • 341 | xspliner MI2 Using surrogate black-boxes to train interpretable spline based additive models
  • 342 |
  • 343 | factorMerger MI2 Set of tools for factors merging paper 344 |
  • 345 |
  • 346 | ingredients MI2 Set of tools for model level feature effects and feature importance.
  • 347 |
348 |
349 |
350 |

351 | 4. Model assembly

352 |
    353 |
  • 354 | mlr Machine Learning in R paper 355 |
  • 356 |
  • 357 | caret Classification And Regression Training paper 358 |
  • 359 |
360 |
361 |
362 |

363 | 5. Model audit

364 |
    365 |
  • 366 | auditor MI2 model verification, validation, and error analysis vigniette 367 |
  • 368 |
  • 369 | DALEX MI2 Descriptive mAchine Learning EXplanations
  • 370 |
  • 371 | iml; interpretable machine learning R package
  • 372 |
  • 373 | randomForestExplainer MI2 A set of tools to understand what is happening inside a Random Forest
  • 374 |
  • 375 | survxai MI2 Explanations for survival models paper 376 |
  • 377 |
378 |
379 |
380 |

381 | 6. Model delivery

382 |
    383 |
  • 384 | iBreakDown, pyBreakDown MI2 Model Agnostic Explainers for Individual Predictions (with interactions)
  • 385 |
  • 386 | ceterisParibus, pyCeterisParibus, ceterisParibusD3 and ingredients MI2 Ceteris Paribus Plots (What-If plots) for explanations of a single observation
  • 387 |
  • 388 | localModel and live MI2 LIME-like explanations with interpretable features based on Ceteris Paribus curves.
  • 389 |
  • 390 | lime; Local Interpretable Model-Agnostic Explanations (R port of original Python package)
  • 391 |
  • 392 | shapper MI2 An R wrapper of SHAP python library
  • 393 |
  • 394 | modelDown MI2 modelDown generates a website with HTML summaries for predictive models
  • 395 |
  • 396 | modelStudio MI2 modelStudio generates an interactive dashboard with D3 based summaries for predictive models
  • 397 |
  • 398 | drifter MI2 Concept Drift and Concept Shift Detection for Predictive Models
  • 399 |
  • 400 | archivist MI2 A set of tools for datasets and plots archiving paper 401 |
  • 402 |
403 |
404 |
405 |
406 |

407 | Family of Model Explainers

408 |

images/DrWhyAI.png

409 |
410 |
411 |

412 | Architecture of DrWhy

413 |

DrWhy works on fully trained predictive models. Models can be created with any tool.

414 |

DrWhy uses DALEX package to wrap model with additional metadata required for explanations, like validation data, predict function etc.

415 |

Explainers for predictive models can be created with model agnostic or model specific functions implemented in various packages.

416 |

Hype_Cycle

417 |
418 |
419 |
420 | 421 | 443 |
444 | 445 | 446 |
447 |

448 | Developed by Przemyslaw Biecek. 449 | Site built by pkgdown. 450 |

451 |
452 | 453 |
454 |
455 | 456 | 457 | 458 | 459 | 460 | 461 | -------------------------------------------------------------------------------- /docs/jquery.sticky-kit.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | Sticky-kit v1.1.2 | WTFPL | Leaf Corcoran 2015 | http://leafo.net 3 | */ 4 | (function(){var b,f;b=this.jQuery||window.jQuery;f=b(window);b.fn.stick_in_parent=function(d){var A,w,J,n,B,K,p,q,k,E,t;null==d&&(d={});t=d.sticky_class;B=d.inner_scrolling;E=d.recalc_every;k=d.parent;q=d.offset_top;p=d.spacer;w=d.bottoming;null==q&&(q=0);null==k&&(k=void 0);null==B&&(B=!0);null==t&&(t="is_stuck");A=b(document);null==w&&(w=!0);J=function(a,d,n,C,F,u,r,G){var v,H,m,D,I,c,g,x,y,z,h,l;if(!a.data("sticky_kit")){a.data("sticky_kit",!0);I=A.height();g=a.parent();null!=k&&(g=g.closest(k)); 5 | if(!g.length)throw"failed to find stick parent";v=m=!1;(h=null!=p?p&&a.closest(p):b("
"))&&h.css("position",a.css("position"));x=function(){var c,f,e;if(!G&&(I=A.height(),c=parseInt(g.css("border-top-width"),10),f=parseInt(g.css("padding-top"),10),d=parseInt(g.css("padding-bottom"),10),n=g.offset().top+c+f,C=g.height(),m&&(v=m=!1,null==p&&(a.insertAfter(h),h.detach()),a.css({position:"",top:"",width:"",bottom:""}).removeClass(t),e=!0),F=a.offset().top-(parseInt(a.css("margin-top"),10)||0)-q, 6 | u=a.outerHeight(!0),r=a.css("float"),h&&h.css({width:a.outerWidth(!0),height:u,display:a.css("display"),"vertical-align":a.css("vertical-align"),"float":r}),e))return l()};x();if(u!==C)return D=void 0,c=q,z=E,l=function(){var b,l,e,k;if(!G&&(e=!1,null!=z&&(--z,0>=z&&(z=E,x(),e=!0)),e||A.height()===I||x(),e=f.scrollTop(),null!=D&&(l=e-D),D=e,m?(w&&(k=e+u+c>C+n,v&&!k&&(v=!1,a.css({position:"fixed",bottom:"",top:c}).trigger("sticky_kit:unbottom"))),eb&&!v&&(c-=l,c=Math.max(b-u,c),c=Math.min(q,c),m&&a.css({top:c+"px"})))):e>F&&(m=!0,b={position:"fixed",top:c},b.width="border-box"===a.css("box-sizing")?a.outerWidth()+"px":a.width()+"px",a.css(b).addClass(t),null==p&&(a.after(h),"left"!==r&&"right"!==r||h.append(a)),a.trigger("sticky_kit:stick")),m&&w&&(null==k&&(k=e+u+c>C+n),!v&&k)))return v=!0,"static"===g.css("position")&&g.css({position:"relative"}), 8 | a.css({position:"absolute",bottom:d,top:"auto"}).trigger("sticky_kit:bottom")},y=function(){x();return l()},H=function(){G=!0;f.off("touchmove",l);f.off("scroll",l);f.off("resize",y);b(document.body).off("sticky_kit:recalc",y);a.off("sticky_kit:detach",H);a.removeData("sticky_kit");a.css({position:"",bottom:"",top:"",width:""});g.position("position","");if(m)return null==p&&("left"!==r&&"right"!==r||a.insertAfter(h),h.remove()),a.removeClass(t)},f.on("touchmove",l),f.on("scroll",l),f.on("resize", 9 | y),b(document.body).on("sticky_kit:recalc",y),a.on("sticky_kit:detach",H),setTimeout(l,0)}};n=0;for(K=this.length;n 2 | 3 | 5 | 8 | 12 | 13 | -------------------------------------------------------------------------------- /docs/news/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Changelog • DrWhy 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 49 | 50 | 51 | 52 | 59 | 60 | 61 | 62 | 63 |
64 |
65 | 116 | 117 | 118 | 119 |
120 | 121 |
122 |
123 | 127 | 128 |
129 |

130 | DrWhy 0.9

131 |

First version created based on tidyverse 1.2.1.9000

132 |
133 |
134 | 135 | 143 | 144 |
145 | 146 | 147 |
148 |
149 |

150 | Developed by Przemyslaw Biecek. 151 | Site built by pkgdown. 152 |

153 |
154 | 155 |
156 |
157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | -------------------------------------------------------------------------------- /docs/pkgdown.css: -------------------------------------------------------------------------------- 1 | /* Sticky footer */ 2 | 3 | /** 4 | * Basic idea: https://philipwalton.github.io/solved-by-flexbox/demos/sticky-footer/ 5 | * Details: https://github.com/philipwalton/solved-by-flexbox/blob/master/assets/css/components/site.css 6 | * 7 | * .Site -> body > .container 8 | * .Site-content -> body > .container .row 9 | * .footer -> footer 10 | * 11 | * Key idea seems to be to ensure that .container and __all its parents__ 12 | * have height set to 100% 13 | * 14 | */ 15 | 16 | html, body { 17 | height: 100%; 18 | } 19 | 20 | body > .container .row { 21 | flex: 1 0 auto; 22 | } 23 | 24 | footer { 25 | margin-top: 45px; 26 | padding: 35px 0 36px; 27 | border-top: 1px solid #e5e5e5; 28 | color: #666; 29 | display: flex; 30 | flex-shrink: 0; 31 | } 32 | footer p { 33 | margin-bottom: 0; 34 | } 35 | footer div { 36 | flex: 1; 37 | } 38 | footer .pkgdown { 39 | text-align: right; 40 | } 41 | footer p { 42 | margin-bottom: 0; 43 | } 44 | 45 | img.icon { 46 | float: right; 47 | } 48 | 49 | img { 50 | max-width: 100%; 51 | } 52 | 53 | /* Fix bug in bootstrap (only seen in firefox) */ 54 | summary { 55 | display: list-item; 56 | } 57 | 58 | /* Typographic tweaking ---------------------------------*/ 59 | 60 | .contents .page-header { 61 | margin-top: calc(-60px + 1em); 62 | } 63 | 64 | /* Section anchors ---------------------------------*/ 65 | 66 | a.anchor { 67 | margin-left: -30px; 68 | display:inline-block; 69 | width: 30px; 70 | height: 30px; 71 | visibility: hidden; 72 | 73 | background-image: url(./link.svg); 74 | background-repeat: no-repeat; 75 | background-size: 20px 20px; 76 | background-position: center center; 77 | } 78 | 79 | .hasAnchor:hover a.anchor { 80 | visibility: visible; 81 | } 82 | 83 | @media (max-width: 767px) { 84 | .hasAnchor:hover a.anchor { 85 | visibility: hidden; 86 | } 87 | } 88 | 89 | 90 | /* Fixes for fixed navbar --------------------------*/ 91 | 92 | .contents h1, .contents h2, .contents h3, .contents h4 { 93 | padding-top: 60px; 94 | margin-top: -60px; 95 | } 96 | 97 | /* Sidebar --------------------------*/ 98 | 99 | #sidebar { 100 | margin-top: 30px; 101 | position: -webkit-sticky; 102 | position: sticky; 103 | top: 70px; 104 | } 105 | #sidebar h2 { 106 | font-size: 1.5em; 107 | margin-top: 1em; 108 | } 109 | 110 | #sidebar h2:first-child { 111 | margin-top: 0; 112 | } 113 | 114 | #sidebar .list-unstyled li { 115 | margin-bottom: 0.5em; 116 | } 117 | 118 | #sidebar .nav nav-pills .nav-stacked > li > a:focus, .nav-pills > li > a:focus { 119 | background-color: #4a3c89 !important; 120 | color: #fff; 121 | } 122 | #sidebar .nav nav-pills .nav-stacked > li.active > a, .nav-pills > li.active > a{ 123 | background-color: #370f54 !important; 124 | } 125 | #sidebar .nav nav-pills .nav-stacked > li > a, .nav-pills > li > a{ 126 | background-color: #4a3c89 !important; 127 | color: #fff; 128 | } 129 | 130 | .orcid { 131 | height: 16px; 132 | /* margins are required by official ORCID trademark and display guidelines */ 133 | margin-left:4px; 134 | margin-right:4px; 135 | vertical-align: middle; 136 | } 137 | 138 | /* Reference index & topics ----------------------------------------------- */ 139 | 140 | .ref-index th {font-weight: normal;} 141 | 142 | .ref-index td {vertical-align: top;} 143 | .ref-index .icon {width: 40px;} 144 | .ref-index .alias {width: 40%;} 145 | .ref-index-icons .alias {width: calc(40% - 40px);} 146 | .ref-index .title {width: 60%;} 147 | 148 | .ref-arguments th {text-align: right; padding-right: 10px;} 149 | .ref-arguments th, .ref-arguments td {vertical-align: top;} 150 | .ref-arguments .name {width: 20%;} 151 | .ref-arguments .desc {width: 80%;} 152 | 153 | /* Nice scrolling for wide elements --------------------------------------- */ 154 | 155 | table { 156 | display: block; 157 | overflow: auto; 158 | } 159 | 160 | /* Syntax highlighting ---------------------------------------------------- */ 161 | 162 | pre { 163 | word-wrap: normal; 164 | word-break: normal; 165 | border: 1px solid #eee; 166 | } 167 | 168 | pre, code { 169 | background-color: #f8f8f8; 170 | color: #333; 171 | } 172 | 173 | pre code { 174 | overflow: auto; 175 | word-wrap: normal; 176 | white-space: pre; 177 | } 178 | 179 | pre .img { 180 | margin: 5px 0; 181 | } 182 | 183 | pre .img img { 184 | background-color: #fff; 185 | display: block; 186 | height: auto; 187 | } 188 | 189 | code a, pre a { 190 | color: #375f84; 191 | } 192 | 193 | a.sourceLine:hover { 194 | text-decoration: none; 195 | } 196 | 197 | .fl {color: #1514b5;} 198 | .fu {color: #000000;} /* function */ 199 | .ch,.st {color: #036a07;} /* string */ 200 | .kw {color: #264D66;} /* keyword */ 201 | .co {color: #888888;} /* comment */ 202 | 203 | .message { color: black; font-weight: bolder;} 204 | .error { color: orange; font-weight: bolder;} 205 | .warning { color: #6A0366; font-weight: bolder;} 206 | 207 | /* Clipboard --------------------------*/ 208 | 209 | .hasCopyButton { 210 | position: relative; 211 | } 212 | 213 | .btn-copy-ex { 214 | position: absolute; 215 | right: 0; 216 | top: 0; 217 | visibility: hidden; 218 | } 219 | 220 | .hasCopyButton:hover button.btn-copy-ex { 221 | visibility: visible; 222 | } 223 | 224 | /* headroom.js ------------------------ */ 225 | 226 | .headroom { 227 | will-change: transform; 228 | transition: transform 200ms linear; 229 | } 230 | .headroom--pinned { 231 | transform: translateY(0%); 232 | } 233 | .headroom--unpinned { 234 | transform: translateY(-100%); 235 | } 236 | 237 | /* mark.js ----------------------------*/ 238 | 239 | mark { 240 | background-color: rgba(255, 255, 51, 0.5); 241 | border-bottom: 2px solid rgba(255, 153, 51, 0.3); 242 | padding: 1px; 243 | } 244 | 245 | /* vertical spacing after htmlwidgets */ 246 | .html-widget { 247 | margin-bottom: 10px; 248 | } 249 | -------------------------------------------------------------------------------- /docs/pkgdown.js: -------------------------------------------------------------------------------- 1 | /* http://gregfranko.com/blog/jquery-best-practices/ */ 2 | (function($) { 3 | $(function() { 4 | 5 | $('.navbar-fixed-top').headroom(); 6 | 7 | $('body').css('padding-top', $('.navbar').height() + 10); 8 | $(window).resize(function(){ 9 | $('body').css('padding-top', $('.navbar').height() + 10); 10 | }); 11 | 12 | $('body').scrollspy({ 13 | target: '#sidebar', 14 | offset: 60 15 | }); 16 | 17 | $('[data-toggle="tooltip"]').tooltip(); 18 | 19 | var cur_path = paths(location.pathname); 20 | var links = $("#navbar ul li a"); 21 | var max_length = -1; 22 | var pos = -1; 23 | for (var i = 0; i < links.length; i++) { 24 | if (links[i].getAttribute("href") === "#") 25 | continue; 26 | // Ignore external links 27 | if (links[i].host !== location.host) 28 | continue; 29 | 30 | var nav_path = paths(links[i].pathname); 31 | 32 | var length = prefix_length(nav_path, cur_path); 33 | if (length > max_length) { 34 | max_length = length; 35 | pos = i; 36 | } 37 | } 38 | 39 | // Add class to parent
  • , and enclosing
  • if in dropdown 40 | if (pos >= 0) { 41 | var menu_anchor = $(links[pos]); 42 | menu_anchor.parent().addClass("active"); 43 | menu_anchor.closest("li.dropdown").addClass("active"); 44 | } 45 | }); 46 | 47 | function paths(pathname) { 48 | var pieces = pathname.split("/"); 49 | pieces.shift(); // always starts with / 50 | 51 | var end = pieces[pieces.length - 1]; 52 | if (end === "index.html" || end === "") 53 | pieces.pop(); 54 | return(pieces); 55 | } 56 | 57 | // Returns -1 if not found 58 | function prefix_length(needle, haystack) { 59 | if (needle.length > haystack.length) 60 | return(-1); 61 | 62 | // Special case for length-0 haystack, since for loop won't run 63 | if (haystack.length === 0) { 64 | return(needle.length === 0 ? 0 : -1); 65 | } 66 | 67 | for (var i = 0; i < haystack.length; i++) { 68 | if (needle[i] != haystack[i]) 69 | return(i); 70 | } 71 | 72 | return(haystack.length); 73 | } 74 | 75 | /* Clipboard --------------------------*/ 76 | 77 | function changeTooltipMessage(element, msg) { 78 | var tooltipOriginalTitle=element.getAttribute('data-original-title'); 79 | element.setAttribute('data-original-title', msg); 80 | $(element).tooltip('show'); 81 | element.setAttribute('data-original-title', tooltipOriginalTitle); 82 | } 83 | 84 | if(ClipboardJS.isSupported()) { 85 | $(document).ready(function() { 86 | var copyButton = ""; 87 | 88 | $(".examples, div.sourceCode").addClass("hasCopyButton"); 89 | 90 | // Insert copy buttons: 91 | $(copyButton).prependTo(".hasCopyButton"); 92 | 93 | // Initialize tooltips: 94 | $('.btn-copy-ex').tooltip({container: 'body'}); 95 | 96 | // Initialize clipboard: 97 | var clipboardBtnCopies = new ClipboardJS('[data-clipboard-copy]', { 98 | text: function(trigger) { 99 | return trigger.parentNode.textContent; 100 | } 101 | }); 102 | 103 | clipboardBtnCopies.on('success', function(e) { 104 | changeTooltipMessage(e.trigger, 'Copied!'); 105 | e.clearSelection(); 106 | }); 107 | 108 | clipboardBtnCopies.on('error', function() { 109 | changeTooltipMessage(e.trigger,'Press Ctrl+C or Command+C to copy'); 110 | }); 111 | }); 112 | } 113 | })(window.jQuery || window.$) 114 | -------------------------------------------------------------------------------- /docs/pkgdown.yml: -------------------------------------------------------------------------------- 1 | pandoc: '2.6' 2 | pkgdown: 1.4.1 3 | pkgdown_sha: ~ 4 | articles: [] 5 | 6 | -------------------------------------------------------------------------------- /docs/reference/DrWhy_logo.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | The DrWhy logo, using ASCII art — DrWhy_logo • DrWhy 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 52 | 53 | 54 | 55 | 62 | 63 | 64 | 65 | 66 |
    67 |
    68 | 119 | 120 | 121 | 122 |
    123 | 124 |
    125 |
    126 | 131 | 132 |
    133 | 134 |

    The DrWhy logo, using ASCII art

    135 | 136 |
    137 | 138 |
    DrWhy_logo()
    139 | 140 | 141 |

    Examples

    142 |
    DrWhy_logo()
    #> _____ 143 | #> ____ _ _ _ _ |___ | 144 | #> | \ ___ | | | | |_ _ _| _| 145 | #> | | | _| | | | | | | |_| 146 | #> |____/|_| |_____|_|_|_ |_| 147 | #> |___|
    148 |
    149 | 157 |
    158 | 159 | 160 |
    161 |
    162 |

    163 | Developed by Przemyslaw Biecek. 164 | Site built by pkgdown. 165 |

    166 |
    167 | 168 |
    169 |
    170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | -------------------------------------------------------------------------------- /docs/reference/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Function reference • DrWhy 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 49 | 50 | 51 | 52 | 59 | 60 | 61 | 62 | 63 |
    64 |
    65 | 116 | 117 | 118 | 119 |
    120 | 121 |
    122 |
    123 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 141 | 142 | 143 | 144 | 147 | 148 | 149 | 150 |
    138 |

    All functions

    139 |

    140 |
    145 |

    DrWhy_logo()

    146 |

    The DrWhy logo, using ASCII art

    151 |
    152 | 153 | 159 |
    160 | 161 | 162 |
    163 |
    164 |

    165 | Developed by Przemyslaw Biecek. 166 | Site built by pkgdown. 167 |

    168 |
    169 | 170 |
    171 |
    172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | -------------------------------------------------------------------------------- /docs/tocBullet.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /hex-stickers/DrWhy-RGB-DALEX.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/hex-stickers/DrWhy-RGB-DALEX.png -------------------------------------------------------------------------------- /hex-stickers/DrWhy-RGB-DALEXtra.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/hex-stickers/DrWhy-RGB-DALEXtra.png -------------------------------------------------------------------------------- /hex-stickers/DrWhy-RGB-EloML.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/hex-stickers/DrWhy-RGB-EloML.png -------------------------------------------------------------------------------- /hex-stickers/DrWhy-RGB-auditor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/hex-stickers/DrWhy-RGB-auditor.png -------------------------------------------------------------------------------- /hex-stickers/DrWhy-RGB-fairmodels.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/hex-stickers/DrWhy-RGB-fairmodels.pdf -------------------------------------------------------------------------------- /hex-stickers/DrWhy-RGB-fairmodels.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/hex-stickers/DrWhy-RGB-fairmodels.png -------------------------------------------------------------------------------- /hex-stickers/DrWhy-RGB-iBreakDown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/hex-stickers/DrWhy-RGB-iBreakDown.png -------------------------------------------------------------------------------- /hex-stickers/DrWhy-RGB-ingredients.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/hex-stickers/DrWhy-RGB-ingredients.png -------------------------------------------------------------------------------- /hex-stickers/DrWhy-RGB-modelStudio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/hex-stickers/DrWhy-RGB-modelStudio.png -------------------------------------------------------------------------------- /hex-stickers/DrWhy-RGB-rSAFE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/hex-stickers/DrWhy-RGB-rSAFE.png -------------------------------------------------------------------------------- /hex-stickers/DrWhy-RGB-randomForestExplainer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/hex-stickers/DrWhy-RGB-randomForestExplainer.png -------------------------------------------------------------------------------- /hex-stickers/DrWhy-RGB-shapper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/hex-stickers/DrWhy-RGB-shapper.png -------------------------------------------------------------------------------- /hex-stickers/DrWhy-RGB-vivo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/hex-stickers/DrWhy-RGB-vivo.png -------------------------------------------------------------------------------- /hex-stickers/DrWhy-RGB-xspliner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/hex-stickers/DrWhy-RGB-xspliner.png -------------------------------------------------------------------------------- /images/DALEXverse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/images/DALEXverse.png -------------------------------------------------------------------------------- /images/DrWhy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/images/DrWhy.png -------------------------------------------------------------------------------- /images/DrWhyAI.key: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/images/DrWhyAI.key -------------------------------------------------------------------------------- /images/DrWhyAI.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/images/DrWhyAI.pdf -------------------------------------------------------------------------------- /images/DrWhyAI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/images/DrWhyAI.png -------------------------------------------------------------------------------- /images/Hype_Cycle.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 10 | 11 | 12 | 14 | 15 | 16 | Hype Cycle for Predictive Models 17 | Time 18 | I need a predictive model! 19 | Wow, ML is so easy!! 20 | OMG, my model is not working 21 | on new data!!! 22 | I need to understand the model 23 | I need to use DrWhy!!!! 24 | 25 | -------------------------------------------------------------------------------- /images/ModelDevelopmentProcess.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/images/ModelDevelopmentProcess.pdf -------------------------------------------------------------------------------- /images/diagramMDP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/images/diagramMDP.png -------------------------------------------------------------------------------- /images/family.ai: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/images/family.ai -------------------------------------------------------------------------------- /images/family.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/images/family.png -------------------------------------------------------------------------------- /images/grammar_of_explanations.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/images/grammar_of_explanations.png -------------------------------------------------------------------------------- /images/local_attributions_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/images/local_attributions_1.jpg -------------------------------------------------------------------------------- /images/local_attributions_1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/images/local_attributions_1.pdf -------------------------------------------------------------------------------- /images/local_attributions_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/images/local_attributions_2.jpg -------------------------------------------------------------------------------- /images/local_attributions_2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/images/local_attributions_2.pdf -------------------------------------------------------------------------------- /images/local_interactions_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/images/local_interactions_1.jpg -------------------------------------------------------------------------------- /images/local_interactions_1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/images/local_interactions_1.pdf -------------------------------------------------------------------------------- /images/local_profile_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/images/local_profile_1.jpg -------------------------------------------------------------------------------- /images/local_profile_1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/images/local_profile_1.pdf -------------------------------------------------------------------------------- /images/mi2.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 28 | 41 | 49 | 53 | 57 | 59 | 61 | 70 | 72 | 74 | 76 | 78 | 80 | 83 | 85 | 87 | 89 | 90 | MI 91 | 92 | -------------------------------------------------------------------------------- /logo/README.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /logo/d1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/logo/d1.png -------------------------------------------------------------------------------- /logo/d2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/logo/d2.png -------------------------------------------------------------------------------- /logo/d3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/logo/d3.png -------------------------------------------------------------------------------- /logo/d4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/logo/d4.png -------------------------------------------------------------------------------- /logo/drwhy_hex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/logo/drwhy_hex.png -------------------------------------------------------------------------------- /man/DrWhy_logo.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/logo.R 3 | \name{DrWhy_logo} 4 | \alias{DrWhy_logo} 5 | \title{The DrWhy logo, using ASCII art} 6 | \usage{ 7 | DrWhy_logo() 8 | } 9 | \description{ 10 | The DrWhy logo, using ASCII art 11 | } 12 | \examples{ 13 | DrWhy_logo() 14 | } 15 | -------------------------------------------------------------------------------- /tests/testthat.R: -------------------------------------------------------------------------------- 1 | library(testthat) 2 | library(DrWhy) 3 | 4 | test_check("DrWhy") 5 | -------------------------------------------------------------------------------- /tests/testthat/test_loaded.R: -------------------------------------------------------------------------------- 1 | context("Check code vector") 2 | 3 | test_that("Is there DALEX2",{ 4 | expect_true("DALEX2" %in% core) 5 | }) 6 | -------------------------------------------------------------------------------- /vignettes/DALEX_architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModelOriented/DrWhy/2cb4580ff41843769ab967ab6563b204d1a81f32/vignettes/DALEX_architecture.png -------------------------------------------------------------------------------- /vignettes/manifesto.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: "The DrWhy manifesto" 3 | author: "Przemyslaw Biecek" 4 | date: "`r Sys.Date()`" 5 | output: rmarkdown::html_vignette 6 | vignette: > 7 | %\VignetteIndexEntry{The DrWhy manifesto} 8 | %\VignetteEngine{knitr::rmarkdown} 9 | %\VignetteEncoding{UTF-8} 10 | --- 11 | 12 | I simply love the [tidyverse manifesto](https://github.com/tidyverse/tidyverse/blob/master/vignettes/manifesto.Rmd) written by Hadley Wickham. 13 | 14 | Especially one point, that I believe is a key differentiator between DrWhy tools and many other tools for XAI. 15 | 16 | ## Design for humans 17 | 18 | *Copied from tidyverse manifesto* 19 | 20 | Design your API primarily so that it is easy to use by humans. Computer efficiency is a secondary concern because the bottleneck in most data analysis is thinking time, not computing time. 21 | 22 | * Invest time in naming your functions. Evocative function names 23 | make your API easier to use and remember. 24 | 25 | * Favour explicit, lengthy names, over short, implicit, names. 26 | Save the shortest names for the most important operations. 27 | 28 | * Think about how autocomplete can also make an API that's easy to 29 | write. Make sure that function families are identified by a 30 | common prefix, not a common suffix. This makes autocomplete more 31 | helpful, as you can jog your memory with the prompts. For smaller 32 | packages, this may mean that every function has a common prefix 33 | (e.g. stringr, xml2, rvest). 34 | 35 | --------------------------------------------------------------------------------