Book description
Understand the key aspects and challenges of machine learning interpretability, learn how to overcome them with interpretation methods, 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 understand your models and mitigate risks associated with poor predictions using machine learning (ML) interpretation? Interpretable Machine Learning with Python can help you work effectively with ML models.
The first section of the book is a beginner's guide to interpretability, covering its relevance in business and exploring its key aspects and challenges. You'll focus on how white-box models work, compare them to black-box and glass-box models, and examine their trade-off. The second section will 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, the book also helps the reader to interpret model outcomes using examples. In the third section, 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 Naive 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 for data scientists, machine learning developers, and data stewards who have an increasingly critical responsibility to explain how the AI systems they develop work, their impact on decision making, and how they identify and manage bias. Working knowledge of machine learning and the Python programming language is expected.
Publisher resources
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 and detailed dive into the key aspects and challenges of machine learning interpretability, complete …
book
Probabilistic Machine Learning for Finance and Investing
There are several reasons why probabilistic machine learning represents the next-generation ML framework and technology for …
book
Radar Trends to Watch: September 2023
Read about the latest developments on O'Reilly Media's Radar.
book
Foundations of Scalable Systems
In many systems, scalability becomes the primary driver as the user base grows. Attractive features and …