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
- Extract easy-to-understand insights from any machine learning model
- Become well-versed with interpretability techniques to build fairer, safer, and more reliable models
- Lift the lid on the black box of transformer NLP models to improve your deep learning understanding
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, Second Edition is the book for you.
You’ll cover the fundamentals of interpretability, its relevance in business, and explore its key aspects and challenges.
See how white-box models work, compare them to black-box and glass-box models, and examine their trade-offs. Get 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, tabular data, time-series, images, or text.
In addition to the step-by-step code, this book will also help you interpret model outcomes using many 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. You’ll also look under the hood of the latest NLP transformer models using the Language Interpretability Tool.
By the end of this book, you'll 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, Naive Bayes, and glass-box models, such as EBM and Gami-NET
- Become well-versed in interpreting black-box models with model-agnostic methods
- Use monotonic and interaction constraints to make fairer and safer models
- Understand how to mitigate the influence of bias in datasets
- Discover how to make models more reliable with adversarial robustness
- Understand how transformer models work and how to interpret them
Who this book is for
This book is for data scientists, machine learning developers, MLOps engineers, 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 It’s also a useful resource for self-taught ML enthusiasts and beginners who want to go deeper into the subject matter, though a good grasp of the Python programming language is needed to implement the examples.
Table of contents
- Interpretable Machine Learning with Python, Second Edition: Build Your Own Interpretable Models
- 1 Interpretation, Interpretability, and Explainability; and Why Does It All Matter?
- 2 Key Concepts of Interpretability
-
3 Interpretation Challenges
- Join our book community on Discord
- 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
-
5 Local Model-Agnostic Interpretation Methods
- Join our book community on Discord
- Technical requirements
- The mission
- The approach
- The preparations
- Leveraging SHAP's KernelExplainer for local interpretations with SHAP values
- Employing LIME
- Using LIME for NLP
- Trying SHAP for NLP
- Comparing SHAP with LIME
- Mission accomplished
- Summary
- Dataset sources
- Further reading
- 6 Anchor and Counterfactual Explanations
-
9 Interpretation Methods for Multivariate Forecasting and Sensitivity Analysis
- Join our book community on Discord
- 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
-
10 Feature Selection and Engineering for Interpretability
- Join our book community on Discord
- 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
- Hybrid methods
- Considering feature engineering
- Mission accomplished
- Summary
- Dataset sources
- Further reading
- 14 What's Next for Machine Learning Interpretability?
Product information
- Title: Interpretable Machine Learning with Python - Second Edition
- Author(s):
- Release date: October 2022
- Publisher(s): Packt Publishing
- ISBN: 9781803235424
You might also like
book
Skills of a Successful Software Engineer
Skills to grow from a solo coder into a productive member of a software development team, …
book
Applied Machine Learning Explainability Techniques
Leverage top XAI frameworks to explain your machine learning models with ease and discover best practices …
book
Machine Learning for Finance
A guide to advances in machine learning for financial professionals, with working Python code Key Features …
book
Modern Time Series Forecasting with Python
Build real-world time series forecasting systems which scale to millions of time series by applying modern …