Book Image

Hands-On Explainable AI (XAI) with Python

By : Denis Rothman
Book Image

Hands-On Explainable AI (XAI) with Python

By: Denis Rothman

Overview of this book

Effectively translating AI insights to business stakeholders requires careful planning, design, and visualization choices. Describing the problem, the model, and the relationships among variables and their findings are often subtle, surprising, and technically complex. Hands-On Explainable AI (XAI) with Python will see you work with specific hands-on machine learning Python projects that are strategically arranged to enhance your grasp on AI results analysis. You will be building models, interpreting results with visualizations, and integrating XAI reporting tools and different applications. You will build XAI solutions in Python, TensorFlow 2, Google Cloud’s XAI platform, Google Colaboratory, and other frameworks to open up the black box of machine learning models. The book will introduce you to several open-source XAI tools for Python that can be used throughout the machine learning project life cycle. You will learn how to explore machine learning model results, review key influencing variables and variable relationships, detect and handle bias and ethics issues, and integrate predictions using Python along with supporting the visualization of machine learning models into user explainable interfaces. By the end of this AI book, you will possess an in-depth understanding of the core concepts of XAI.
Table of Contents (16 chapters)
14
Other Books You May Enjoy
15
Index

Model outputs and SHAP values

In this section, we will begin to play with AI fairness, which will prepare us for WIT.

The default display shows the features grouped by feature prediction similarity:

Figure 6.4: SHAP plot

You can change the plot by selecting a feature at the top of the plot. Select social-class_SC2, for example:

Figure 6.5: Selecting social-class_SC2 from the feature list

To observe the model's predictions, choose a feature on the left side of the plot for the y axis. Select model output value, for example:

Figure 6.6: Selecting model output value from the feature list

In the Preparing an ethical dataset section of this chapter, the value of social-class_SC2 represents the level of education of a person, a defendant. A population with a very high level of education has fewer chances of committing physical crimes.

If we select model output value the plot will display the recidivism prediction of the model...