🎨
Explainable-AI
  • Explainable AI
  • Preface
  • How to use this book?
  • Contents
  • What is Explainable AI?
  • Why do we need Explainablity?
  • Explainable systems and Black box systems
  • Types of Explainability Techniques
  • Explainable Models
    • Linear Regression
      • Assumptions
      • Model
      • Statistical Interpretation
    • Decision Trees
      • How Do They Work?
      • Creating the model
      • Interpretation
  • Explainability Techniques for Classical ML
    • SHAP (SHapley Additive exPlanations)
    • Surrogate model
    • LIME (Local Interpretable Model-Agnostic Explanations)
    • PDP (Partial Dependence Plot)
    • ICE (Individual Conditional Expectation Plots)
    • ALE (Accumulated Local Effects Plot)
  • Datasets
    • Medical Cost Personal Dataset
    • Telecom Churn Dataset
    • Sales Opportunity Size Dataset
    • Pima Indians Diabetes Dataset
  • Implementation of these techniques on different models
    • Logistic Regression - SHAP
    • Random Forest - LIME
    • GBM - PDP
    • GBM - ICE
    • Deep Learning - Surrogate
  • Future scope
  • Contributors
  • Citing this Book
Powered by GitBook
On this page
  • What is GBM?
  • Making the Model
  • Implementation of Interpretability
  • Visualizations

Was this helpful?

  1. Implementation of these techniques on different models

GBM - PDP

PreviousRandom Forest - LIMENextGBM - ICE

Last updated 4 years ago

Was this helpful?

Code Implementation Here

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)

Making the Model

Dataset: Pima Indians Diabetes; Target: Outcome

The data is trained by calling the GradientBoostingClassifier function from Scikit learn Library

Accuracy:

Implementation of Interpretability

For this model, we will interpret with Partial Dependence Plots.

With just few lines of code, we can plot the PDPs for any dataset using the sklearn partial_dependence library.

Visualizations

PDP for every feature

The above plot shows how change in output varies with variations in feature values. Some key points for interpretation from the above plots:

  • As Pregnancies increase, the person's chances of becoming diabetic go up

  • Higher the Glucose, higher the chances of person becoming diabetic

  • BMI more than 25 increases an individuals chances of becoming diabetic

3-D PDPs

These plots show the combined effect of two features on the change in output. As seen above, a reduction in both - Insulin and DiabetesPedigreeFunction, results in negative change of a person being diabetic (nearing non-diabetic situation).

PDP interact plot

The below plot shows the change output prediction (value inside square) for every combination of values between the features Insulin and DiabetesPedigreeFunction(values given by scale).