Giter VIP home page Giter VIP logo

ceterisparibus's Introduction

Ceteris Paribus Plots

CRAN_Status_Badge Total Downloads Build Status Coverage Status

Ceteris Paribus Plots (What-If Plots) are designed to present model responses around a single point in the feature space. For example around a single prediction for an interesting observation. Plots are designed to work in a model-agnostic fashion, they are working for any Machine Learning model and allow for model comparisons.

The ceterisParibus Plots supplement the breakDown Plots that are designed to attribute features into parts of a single prediction.

Imagine a scenario in which a client gets low credit score and is wondering why the score is so low. What can I do to get a higher score?

Ceteris Paribus Plots show possible scenarios for model predictions allowing for changes in a single dimension keeping all other features constant (the ceteris paribus principle).

See a short 100 secs introduction to the package on YouTube.

Ceteris Paribus 100 sec introduction

Find more about Ceteris Paribus Profiles in this Gentle introduction to DALEX with examples or in the cheatsheet presented below.

Installation

To get started, install the latest version of ceterisParibus from CRAN

install.packages("ceterisParibus")

or from GitHub:

devtools::install_github("pbiecek/ceterisParibus")

Simple Ceteris Paribus Plot

The plot below shows Ceteris Paribus plots for an apartment data for a large apartment (130 m2) on 3-rd floor. On can read what would be the model prediction for smaller apartment (largest change) or one that is located higher.

Uniform Ceteris Paribus Plot

Since different variables may have different scales, we recommend to transform variables into quantiles. Then it is much easier to see how a particular variable looks in relation to others.

Having all variables in a single quantile scale we may plot them together in a single plot.

Multimodel Ceteris Paribus Plot

We may compare responses for few models in a single plot.

Some equations

More formally, a Ceteris Paribus plot for variable V and observations O is a set of points (X, Y) where

$$Y(X) := f(O_1, ..., O_{V-1}, O_{V} + X, O_{V+1}, ..., O_{p})$$

More examples

https://pbiecek.github.io/ceterisParibus/articles/whatIf1d.html

ceterisparibus's People

Contributors

pbiecek avatar agosiewska avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.