Interpretable Machine Learning with Python: Build explainable, fair, and robust high-performance models with hands-on, real-world examples
, Second Edition
Interpret real-world data, including cardiovascular disease data and the COMPAS recidivism scores
Build your interpretability toolkit with global, local, model-agnostic, and model-specific methods
Analyze and extract insights from complex models from CNNs to BERT to time series models
Description
Interpretable Machine Learning with Python, Second Edition, brings to light the key concepts of interpreting machine learning models by analyzing real-world data, providing you with a wide range of skills and tools to decipher the results of even the most complex models.
Build your interpretability toolkit with several use cases, from flight delay prediction to waste classification to COMPAS risk assessment scores. This book is full of useful techniques, introducing them to the right use case. Learn traditional methods, such as feature importance and partial dependence plots to integrated gradients for NLP interpretations and gradient-based attribution methods, such as saliency maps.
In addition to the step-by-step code, you’ll get hands-on with tuning models and training data for interpretability by reducing complexity, mitigating bias, placing guardrails, and enhancing reliability.
By the end of the book, you’ll be confident in tackling interpretability challenges with black-box models using tabular, language, image, and time series data.
Who is this book for?
This book is for data scientists, machine learning developers, machine learning engineers, MLOps engineers, and data stewards who have an increasingly critical responsibility to explain how the artificial intelligence 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.
What you will learn
Progress from basic to advanced techniques, such as causal inference and quantifying uncertainty
Build your skillset from analyzing linear and logistic models to complex ones, such as CatBoost, CNNs, and NLP transformers
Use monotonic and interaction constraints to make fairer and safer models
Understand how to mitigate the influence of bias in datasets
Leverage sensitivity analysis factor prioritization and factor fixing for any model
Discover how to make models more reliable with adversarial robustness
came across this years ago but found the libraries to hard to install (great book though)... excited to see the setup.py file, and that it appears to be working well
Subscriber review
Valdez laddFeb 13, 2024
5
The book has well written knowledge and resources for this subject. Hard to find so much structured information in one source.
Thank you.
Feefo Verified review
Juan Sebastian RoaDec 09, 2023
5
The book provides a clear and practical guide to demystifying complex ML models. The book adeptly navigates through interpretability techniques, making them accessible to both beginners and seasoned practitioners. Serg skillfully balances theory with real-world applications, making this a valuable resource for anyone seeking a deeper understanding of model transparency in the ML landscape.Bonus: there's a GitHub repository with all Python exercises covered in each chapter, making it hands-on and practical.
Amazon Verified review
Ram SeshadriJan 07, 2024
5
This book can be compared to a new pair of shades. After you read it, you will look at all your pre-built and yet to be trained models in entirely new light! I guarantee it.When this book came out, I actually thought I knew its subject matter well. Alas how naive I was! After reading the first two chapters of “Interpretable Machine Learning by Python” by Serg Masis it was clear to me that my entire knowledge of interpretable ML could be compressed in just those 2 chapters. There were still 12 more chapters and over 500 more pages to go! Thats how little I knew of Interpretable ML. So you can imagine my astonishment when the more I read this book, the more I had to put it down and actually try some of the fantastic code examples that Serg had put together to learn how to look at the models I had built in new ways. It was like have a cool new pair of shades that you wear around not just to impress friends but also to look at old places in new filters.Interpretable ML is the holy grail of all practitioners in this “magic art” we call ML. It’s what every Data Scientist hopes to do after building their best performing machine learning model. But many of them do not know how because they may have built a black box model, while hoping that they would discover tools later to explain how the model actually worked. Luckily for such a data scientist, a book like the one that Serg Masis has created will immensely help.Serg Has painstakingly put together what i believe is a “tour de force” that will find a place in every data scientist’s book shelf. This is a must have book if you want to stand out as a data scientist in your organization or group. Let me tell you why.While most books on interpretable ML focus on techniques, such as shop and lime, they do not help you understand the huge amount of context and learnings needed to apply them effectively to your use case. Serg shows you how by taking real world datasets with 10K or even a million samples and And breaks down each one of them, showing you how to build models, as well as break them apart to reveal what they have learned and how they could be understood by non-technical users. This is a key skill that you have to master as a data scientist. For that alone, this book is worth the money.I learned so much about the wealth of techniques that were available for interrogating models that ranged from the simplest linear model to the most complex transformers we see today. I also found new models such as RuleFit and new techniques like Saliency Maps that I had never heard of. Serg never tires of bringing newer and newer lenses to examining your models!Let me warn however about the size and scope of this book. I thought I would be able to finish the book in a couple of sittings during the Holiday break. I was wrong. It took me two whole weeks to read it to fully understand it. There are so many nuances and code examples that you must sit and try out to really understand it and learn it. This is not for the dilettante in ML. This is for the serious practitioner of ML. But the time you put in will pay you back in spades since more people will listen to you when you explain how your models work which is a critical skill for your success as a data scientist. There you have it! My one line summary of why you should get and read this book!
Amazon Verified review
Sarbjit Singh HanjraJul 29, 2024
5
I just finished reading "Interpretable Machine Learning with Python - Second Edition" Authored by Serg Masís and published by Packt.In the book, readers embark on a comprehensive journey through the intricate world of interpreting machine learning models. Authored with technical precision and practical insights, the book addresses the pressing need for understanding and explaining machine learning algorithms.The initial chapters lay a sturdy foundation, delineating the distinctions between interpretability and explainability while underscoring their significance in real-world applications. Through a compelling business case, readers grasp the imperative of interpretability in decision-making processes.Delving deeper, the book navigates through key concepts and challenges surrounding interpretation methodologies. From traditional model interpretations to the emergence of newer glass-box models, readers gain a nuanced understanding of interpretability paradigms.The narrative unfolds with an exploration of global and local model-agnostic interpretation methods, shedding light on feature importance and interactions. Anchors, counterfactual explanations, and visualization techniques offer multifaceted insights into model behaviors across various domains.The book extends its reach into the realms of convolutional neural networks (CNNs) and natural language processing (NLP) transformers, elucidating complex architectures through visualization and interpretation methods.Further chapters unravel the intricacies of multivariate forecasting, feature selection, bias mitigation, and causal inference methods, empowering readers to navigate through the interpretability landscape with finesse.Finally, discussions on model tuning, adversarial robustness, and future prospects in ML interpretability invite readers to contemplate the evolving role of transparency in machine learning systems."Interpretable Machine Learning with Python" emerges as an indispensable resource for practitioners, researchers, and enthusiasts alike, offering profound insights and actionable strategies to unravel the mysteries of machine learning models.
Serg Masís has been at the confluence of the internet, application development, and analytics for the last two decades. Currently, he's a climate and agronomic data scientist at Syngenta, a leading agribusiness company with a mission to improve global food security. Before that role, he co-founded a start-up, incubated by Harvard Innovation Labs, that combined the power of cloud computing and machine learning with principles in decision-making science to expose users to new places and events. Whether it pertains to leisure activities, plant diseases, or customer lifetime value, Serg is passionate about providing the often-missing link between data and decision-making—and machine learning interpretation helps bridge this gap robustly.
Economy: Delivery to most addresses in the US within 10-15 business days
Premium: Trackable Delivery to most addresses in the US within 3-8 business days
UK:
Economy: Delivery to most addresses in the U.K. within 7-9 business days. Shipments are not trackable
Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days! Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands
EU:
Premium: Trackable delivery to most EU destinations within 4-9 business days.
Australia:
Economy: Can deliver to P. O. Boxes and private residences. Trackable service with delivery to addresses in Australia only. Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro Delivery time is up to 15 business days for remote areas of WA, NT & QLD.
Premium: Delivery to addresses in Australia only Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.
India:
Premium: Delivery to most Indian addresses within 5-6 business days
Rest of the World:
Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days
Asia:
Premium: Delivery to most Asian addresses within 5-9 business days
Disclaimer: All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.
Unfortunately, due to several restrictions, we are unable to ship to the following countries:
Afghanistan
American Samoa
Belarus
Brunei Darussalam
Central African Republic
The Democratic Republic of Congo
Eritrea
Guinea-bissau
Iran
Lebanon
Libiya Arab Jamahriya
Somalia
Sudan
Russian Federation
Syrian Arab Republic
Ukraine
Venezuela
What is custom duty/charge?
Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.
Do I have to pay customs charges for the print book order?
The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.
A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.
How do I know my custom duty charges?
The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.
For example:
If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order?
Cancellation Policy for Published Printed Books:
You can cancel any order within 1 hour of placing the order. Simply contact [email protected] with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at [email protected] using the returns and refund process.
Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.
What is your returns and refunds policy?
Return Policy:
We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on [email protected] with the order number and issue details as explained below:
If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on [email protected] within one hour of placing the order and we will replace/refund you the item cost.
Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on [email protected] who will be able to resolve this issue for you.
You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.
On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on [email protected] within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.
What tax is charged?
Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.
What payment methods can I use?
You can pay with the following card types:
Visa Debit
Visa Credit
MasterCard
PayPal
What is the delivery time and cost of print books?
Shipping Details
USA:
'
Economy: Delivery to most addresses in the US within 10-15 business days
Premium: Trackable Delivery to most addresses in the US within 3-8 business days
UK:
Economy: Delivery to most addresses in the U.K. within 7-9 business days. Shipments are not trackable
Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days! Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands
EU:
Premium: Trackable delivery to most EU destinations within 4-9 business days.
Australia:
Economy: Can deliver to P. O. Boxes and private residences. Trackable service with delivery to addresses in Australia only. Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro Delivery time is up to 15 business days for remote areas of WA, NT & QLD.
Premium: Delivery to addresses in Australia only Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.
India:
Premium: Delivery to most Indian addresses within 5-6 business days
Rest of the World:
Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days
Asia:
Premium: Delivery to most Asian addresses within 5-9 business days
Disclaimer: All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.
Unfortunately, due to several restrictions, we are unable to ship to the following countries: