Explainable AI with PDP (Partial Dependence Plot)

Introduction

What is PDP?

Pros

  • PDPs are simple, easy to understand and can be explained to a non-technical person without any difficulties
  • They can be used to compare models to decide which model works best for a use case
  • They are intuitive and easy to implement

Cons

  • PDP assumes on the default that the features are uncorrelated
  • They can only plot averaged marginal dependence function and cannot work on individual points, which can be a huge problem when the dataset has only 2 equal opposite values
  • They also assume that there are no interactions between the variables which is highly unlikely in the real world
  • Though interactions can be plotted, they are only limited to second-order

Implementation

What is GBM?

  • Gradient Boosting Machine is a machine learning algorithm that forms an ensemble of weakly predicted decision trees
  • It constructs a forward stage-wise additive model by implementing gradient descent in function space
  • Also known as MART (Multiple Additive Regression Trees) and GBRT (Gradient Boosted Regression Trees)

Visualizations

PDP for every feature

  • As Pregnancies increase, the person’s chances of becoming diabetic go up
  • Higher the Glucose, the higher the chances of a person becoming diabetic
  • BMI of more than 25 increases an individual's chances of becoming diabetic

3-D PDPs

PDP interact plot

References

  1. The Elements of Statistical Learning: Trevor Hastie, Robert Tibshirani and Jerome Friedman
  2. Molnar, Christoph. “Interpretable machine learning. A Guide for Making Black Box Models Explainable”, 2019. https://christophm.github.io/interpretable-ml-book/.

--

--

--

Data Scientist | ML-Ops| https://abhi-gm.github.io/ | https://www.linkedin.com/in/abhishek-g-m/ | https://github.com/abhi-gm

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

What are GANs (Generative Adversarial Networks)?

Which would be an optimal home computer configuration for Machine Learning (ML)?

Logistic Regression — General Overview

Keras vs PyTorch

Efficiently detect 3D objects in 2D range image with graph convolution kernels

3D object reconstruction using a few views despite noisy camera poses with FvOR

Transformers for action recognition 40 times faster by focus attention in time

Improve neural surface reconstruction by modeling high-frequency details with HFS

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Abhishek Maheshwarappa

Abhishek Maheshwarappa

Data Scientist | ML-Ops| https://abhi-gm.github.io/ | https://www.linkedin.com/in/abhishek-g-m/ | https://github.com/abhi-gm

More from Medium

Model Drift

How to Measure Dataset Similarity

dogs and mops to show dataset similarity

Many ML projects fail because of this misunderstanding about ML

Understanding Model Uncertainty

Street where a building’s shadow covers part of the street