Book description
A deep and detailed dive into the key aspects and challenges of machine learning interpretability, complete with the know-how on how to overcome and leverage them to build fairer, safer, and more reliable models
Key Features
- Learn how to extract easy-to-understand insights from any machine learning model
- Become well-versed with interpretability techniques to build fairer, safer, and more reliable models
- Mitigate risks in AI systems before they have broader implications by learning how to debug black-box models
Book Description
Do you want to gain a deeper understanding of your models and better mitigate poor prediction risks associated with machine learning interpretation? If so, then Interpretable Machine Learning with Python deserves a place on your bookshelf.
We’ll be starting off with the fundamentals of interpretability, its relevance in business, and exploring its key aspects and challenges.
As you progress through the chapters, you'll then focus on how white-box models work, compare them to black-box and glass-box models, and examine their trade-off. You’ll also get you up to speed with a vast array of interpretation methods, also known as Explainable AI (XAI) methods, and how to apply them to different use cases, be it for classification or regression, for tabular, time-series, image or text.
In addition to the step-by-step code, this book will also help you interpret model outcomes using examples. You’ll get hands-on with tuning models and training data for interpretability by reducing complexity, mitigating bias, placing guardrails, and enhancing reliability. The methods you’ll explore here range from state-of-the-art feature selection and dataset debiasing methods to monotonic constraints and adversarial retraining.
By the end of this book, you'll be able to understand ML models better and enhance them through interpretability tuning.
What you will learn
- Recognize the importance of interpretability in business
- Study models that are intrinsically interpretable such as linear models, decision trees, and Naïve Bayes
- Become well-versed in interpreting models with model-agnostic methods
- Visualize how an image classifier works and what it learns
- Understand how to mitigate the influence of bias in datasets
- Discover how to make models more reliable with adversarial robustness
- Use monotonic constraints to make fairer and safer models
Who this book is for
This book is primarily written for data scientists, machine learning developers, and data stewards who find themselves under increasing pressures to explain the workings of AI systems, their impacts on decision making, and how they identify and manage bias. It’s also a useful resource for self-taught ML enthusiasts and beginners who want to go deeper into the subject matter, though a solid grasp on the Python programming language and ML fundamentals is needed to follow along.
Table of contents
- Interpretable Machine Learning with Python
- Contributors
- About the author
- About the reviewers
- Packt is searching for authors like you
- Preface
- Section 1: Introduction to Machine Learning Interpretation
- Chapter 1: Interpretation, Interpretability, and Explainability; and Why Does It All Matter?
- Chapter 2: Key Concepts of Interpretability
-
Chapter 3: Interpretation Challenges
- Technical requirements
- The mission
- The approach
- The preparations
- Reviewing traditional model interpretation methods
- Understanding limitations of traditional model interpretation methods
- Studying intrinsically interpretable (white-box) models
- Recognizing the trade-off between performance and interpretability
- Discovering newer interpretable (glass-box) models
- Mission accomplished
- Summary
- Dataset sources
- Further reading
- Section 2: Mastering Interpretation Methods
- Chapter 4: Fundamentals of Feature Importance and Impact
- Chapter 5: Global Model-Agnostic Interpretation Methods
- Chapter 6: Local Model-Agnostic Interpretation Methods
- Chapter 7: Anchor and Counterfactual Explanations
-
Chapter 8: Visualizing Convolutional Neural Networks
- Technical requirements
- The mission
- The approach
- Preparations
- Visualizing the learning process with activation-based methods
- Evaluating misclassifications with gradient-based attribution methods
- Understanding classifications with perturbation-based attribution methods
- Mission accomplished
- Summary
- Dataset and image sources
- Further reading
-
Chapter 9: Interpretation Methods for Multivariate Forecasting and Sensitivity Analysis
- Technical requirements
- The mission
- The approach
- The preparation
- Assessing time series models with traditional interpretation methods
- Generating LSTM attributions with integrated gradients
- Computing global and local attributions with SHAP's KernelExplainer
- Identifying influential features with factor prioritization
- Quantifying uncertainty and cost sensitivity with factor fixing
- Mission accomplished
- Summary
- Dataset and image sources
- References
- Section 3:Tuning for Interpretability
-
Chapter 10: Feature Selection and Engineering for Interpretability
- Technical requirements
- The mission
- The approach
- The preparations
- Understanding the effect of irrelevant features
- Reviewing filter-based feature selection methods
- Exploring embedded feature selection methods
- Discovering wrapper, hybrid, and advanced feature selection methods
- Considering feature engineering
- Mission accomplished
- Summary
- Dataset sources
- Further reading
-
Chapter 11: Bias Mitigation and Causal Inference Methods
- Technical requirements
- The mission
- The approach
- The preparations
- Detecting bias
- Mitigating bias
- Creating a causal model
- Understanding heterogeneous treatment effects
- Testing estimate robustness
- Mission accomplished
- Summary
- Dataset sources
- Further reading
-
Chapter 12: Monotonic Constraints and Model Tuning for Interpretability
- Technical requirements
- The mission
- The approach
- The preparations
- Placing guardrails with feature engineering
- Tuning models for interpretability
- Implementing model constraints
- Mission accomplished
- Summary
- Dataset sources
- Further reading
-
Chapter 13: Adversarial Robustness
- Technical requirements
- The mission
- The approach
- The preparations
- Learning about evasion attacks
- Defending against targeted attacks with preprocessing
- Shielding against any evasion attack via adversarial training of a robust classifier
- Evaluating and certifying adversarial robustness
- Mission accomplished
- Summary
- Dataset sources
- Further reading
- Chapter 14: What's Next for Machine Learning Interpretability?
- Other Books You May Enjoy
Product information
- Title: Interpretable Machine Learning with Python
- Author(s):
- Release date: March 2021
- Publisher(s): Packt Publishing
- ISBN: 9781800203907
You might also like
book
Interpretable Machine Learning with Python - Second Edition
A deep dive into the key aspects and challenges of machine learning interpretability using a comprehensive …
book
Python Machine Learning By Example - Third Edition
A comprehensive guide to get you up to speed with the latest developments of practical machine …
book
Machine Learning with Python Cookbook
This practical guide provides nearly 200 self-contained recipes to help you solve machine learning challenges you …
book
Graph-Powered Machine Learning
Upgrade your machine learning models with graph-based algorithms, the perfect structure for complex and interlinked data. …