February 26th, 2019

How to explain a model with H2O Driverless AI

RSS icon RSS Category: Data Science, Driverless AI, Explainable AI, Machine Learning Interpretability

The ability to explain and trust the outcome of an AI-driven business decision is now a crucial aspect of the data science journey. There are many tools in the marketplace that claim to provide transparency and interpretability around machine learning models but how does one actually explain a model?

H2O Driverless AI provides robust interpretability of machine learning models to explain modeling results. With these built in capabilities, everyone including expert and junior data scientists, domain scientists, and data engineers can develop trusted machine learning models and explain them without much complexity.

H2O.ai’s very own Patrick Hall has put together a collection of resources to help guide Driverless AI users around the Machine Learning Interpretability (MLI) capabilities built into the platform. This blog will focus on the Machine Learning Interpretability walkthrough video for Driverless AI and the MLI cheat sheet that goes along with the video.

Start Here

First, adjust the overall settings in Driverless AI to create a more interpretable model.

Set interpretability to >=7, which will result in:

  • Feature selection (less variables in your model)
  • Monotonicity constraints (as a modeling input variable value increases, the model predictions will also always increase or always decrease)
  • Simpler data transformations before model fitting, meaning the inputs to your final model will be more directly interpretable

Also, just like setting a random seed in your favorite modeling package, be sure to click on the ‘Reproducible’ button to ensure repeatable and reproducible results.

During the Driverless AI training process the system will attempt to create new features from the original features in the data set you provided. The final model will typically be built using a combination of the original features and features the system creates on its own. Because of the settings specified above, the system won’t create too many new features, won’t create extremely complex new features, and will make sure the relationship between the original and new features and the model predictions is explainable. Once the model is trained, all the interactive charts described below can be used to explore details about the model. Let’s start with global Shapley feature importance and continue on from there.

 

  1. Global Shapley Feature Importance

Global Shapley feature importance provides an overall view of the drivers of your model’s predictions. Global Shapley values are reported for original features and any feature the Driverless AI system creates on its own.

Global Shapley values: 

  • The average numerical impact of original features and features the Driverless AI system derived on its own that are used in the final Driverless AI model
  • Positive features which push the model’s prediction higher on average; negative features which push predictions lower on average
  • The average model prediction
  1. Global Original Feature Importance

Global original feature importance provides an approximate overall view of how your original features affect model predictions.

 

  1. Partial Dependence

Partial dependence shows the average Driverless AI model prediction and its standard deviation for different values of important original features. This helps you understand the average model behavior for the most important original features.

 

  1. Global Surrogate Decision Tree

The global surrogate decision tree provides an overall flowchart of the Driverless AI model’s decision making processes based on the original features.

The surrogate decision tree shows:

  • Higher and more frequent features in the tree that are more important to the Driverless AI model than lower or less frequent variables
  • The logic behind model decisions and their associated approximate predicted numeric values
  • Features above or below one-another that can indicate an interaction
  • Thickest edges (lines) that are the most common logic through the tree, and likely through the Driverless AI model

 

  1. Global Interpretable Model

The global interpretable model is a linear model of the Driverless AI model predictions.

The interpretable, global linear model of the Driverless AI predictions shows:

  • The Driverless AI model predictions ranked from lowest to highest
  • The Driverless AI model predictions compared to a linear model
  • Quantifies the nonlinearity of the Driverless AI model with the linear model R-squared statistic
  • A basic sanity check of Driverless AI model performance by plotting actuals vs. predicted

 

  1. Local Shapley Feature Importance

Local Shapley feature importance shows how each feature directly impacts each individual row’s prediction.

Local Shapley values:

  • Are similar to global Shapley values but show the numeric impact of each feature for each Driverless AI model prediction
  • Are accurate, consistent, and likely suitable for creating reason codes and adverse action codes
  • Always add up to the model prediction

 

  1. Local Linear Explanations

Local linear explanations show the local linear trends around an individual row (they are derived using the LIME technique). They pair nicely with local Shapley values. The local Shapley values give a point estimate for how a feature impacts an individual row’s prediction, while local linear explanations tell us about the trends of each feature for the same row’s prediction.

 

  1. Local Surrogate Tree Decision Path

The local surrogate decision tree path shows how the logic of the model is applied to any given individual.

The decision path:

  • Shows approximately how row values impact Driverless AI model predictions for that row by showing the row’s path through the decision tree surrogate flow chart
  • The path can also show local interactions that affect model predictions for this row

 

  1. Original Feature Individual Conditional Expectation (ICE)

Individual conditional expectation (ICE) shows how an individual prediction changes when one of the input’s feature’s values are changed. If ICE values are different from partial dependence this can also help confirm interactions spotted in the surrogate decision tree.

 

  1. Local Original Feature Importance

Like the Shapley values in step 6, local original feature importance shows the original features that drive a prediction for an individual row (The Shapley values in step 6 show importance for the new and original features — not just the original features).

As you can see the MLI module of H2O Driverless AI can tell you a lot about how your model is behaving. As this is a relatively new area of research and development, stay tuned for more features like these! Also, check out our Explainable AI page for more resources related to machine learning interpretability.

About the Author

vinod iyengar
Vinod Iyengar, VP of Products

Vinod is VP of Products at H2O.ai. He leads all product marketing efforts, new product development and integrations with partners. Vinod comes with over 10 years of Marketing & Data Science experience in multiple startups. He was the founding employee for his previous startup, Activehours (Earnin), where he helped build the product and bootstrap the user acquisition with growth hacking. He has worked to grow the user base for his companies from almost nothing to millions of customers. He’s built models to score leads, reduce churn, increase conversion, prevent fraud and many more use cases. He brings a strong analytical side and a metrics driven approach to marketing. When he is not busy hacking, Vinod loves painting and reading. He is a huge foodie and will eat anything that doesn’t crawl, swim or move.

Leave a Reply

What are we buying today?

Note: this is a guest blog post by Shrinidhi Narasimhan. It’s 2021 and recommendation engines are

July 5, 2021 - by Rohan Rao
The Emergence of Automated Machine Learning in Industry

This post was originally published by K-Tech, Centre of Excellence for Data Science and AI,

June 30, 2021 - by Parul Pandey
What does it take to win a Kaggle competition? Let’s hear it from the winner himself.

In this series of interviews, I present the stories of established Data Scientists and Kaggle

June 14, 2021 - by Parul Pandey
Snowflake on H2O.ai
H2O Integrates with Snowflake Snowpark/Java UDFs: How to better leverage the Snowflake Data Marketplace and deploy In-Database

One of the goals of machine learning is to find unknown predictive features, even hidden

June 9, 2021 - by Eric Gudgion
Getting the best out of H2O.ai’s academic program

“H2O.ai provides impressively scalable implementations of many of the important machine learning tools in a

May 19, 2021 - by Ana Visneski and Jo-Fai Chow
Regístrese para su prueba gratuita y podrá explorar H2O AI Hybrid Cloud

Recientemente, lanzamos nuestra prueba gratuita de 14 días de H2O AI Hybrid Cloud, lo que

May 17, 2021 - by Ana Visneski and Jo-Fai Chow

Start your 14-day free trial today