What-If Tool
Take the What-If Tool for a spin!
Get a feel for the What-If Tool in a variety of demos in the browser or in notebook environments.

Web demos

Play with the What-If Tool on a pre-loaded trained model and dataset right in the browser.

binary classification model comparison
DATA SOURCE
Compare two binary classification models that predict whether a person earns more than $50k a year, based on their census information. Examine how different features affect each models' prediction, in relation to each other.
regression attributions
DATA SOURCE
Explore the performance of a regression model which predicts a person's age from their census information. Slice your dataset to evaluate performance metrics such as aggregated inference error measures for each subgroup. Explore feature attributions calculated by vanilla gradients.
binary classification image recognition
DATA SOURCE
Predict whether an image contains a smiling face using this binary classification model on the CelebA dataset. Can you identify which group was missing from the training data, resulting in a biased model?
mutli-class classification
DATA SOURCE
This multi-class classification model predicts the species of iris flowers from sepal and petal measurements. Look for correlations between different features and flower types.
binary classification
DATA SOURCE
Inspired by Propublica, investigate fairness using this classifier that mimics the behavior of the COMPAS recidivism classifier. Trained on the COMPAS dataset, this model determines if a person belongs in the Low risk (negative) or Medium or High risk (positive) class for recidivism according to COMPAS.

Notebook Demos

Explore the What-If Tool’s interpretability features in utmost detail in Colaboratory, Jupyter and Cloud AI Notebooks.

binary classification model comparison
DATA SOURCE
Compare two binary classification models that predict whether a person earns more than $50k a year, based on their census information. Examine how different features affect each models' prediction, in relation to each other.
regression
DATA SOURCE
Explore the performance of a regression model which predicts a person's age from their census information. Slice your dataset to evaluate performance metrics such as aggregated inference error measures for each subgroup.
binary classification image recognition keras model custom distance
DATA SOURCE
Predict whether an image contains a smiling face using this binary classification model on the CelebA dataset. Can you identify which group was missing from the training data, resulting in a biased model?
binary classification
DATA SOURCE
Inspired by Propublica, investigate fairness using this classifier that mimics the behavior of the COMPAS recidivism classifier. Trained on the COMPAS dataset, this model determines if a person belongs in the Low risk (negative) or Medium or High risk (positive) class for recidivism according to COMPAS.
binary classification attributions keras model
DATA SOURCE
A version of the COMPAS notebook demo, using the SHAP library to get feature attributions for each prediction.
binary classification model comparison keras model custom distance
DATA SOURCE
Use the What-If Tool to compare two pre-trained models from ConversationAI that determine sentence toxicity, one of which was trained on a more balanced dataset. Examine their performance side-by-side on the Wikipedia Comments dataset. These are keras models which do not use TensorFlow examples as an input format.

Google Cloud AI models

Use the What-If Tool with Cloud AI models, and in conjunction with Explainable AI.

binary classification cloud ai platform
DATA SOURCE
Explore a mortgage classification model that has been deployed on Cloud AI Platform. This model was created with the XGBoost platform and not TensorFlow.
binary classification cloud ai platform xgboost model
DATA SOURCE
Train a mortgage classification model with XGBoost, deploy it to Cloud AI Platform, and use the What-If Tool to analyze it. This demo requires a Google Cloud Platform account.
regression model comparison cloud ai platform keras model scikit-learn model
DATA SOURCE
Train both a scikit-learn and keras model to predict wine quality and deploy them to Cloud AI Platform. Then use the What-If Tool to compare the two models. This demo requires a Google Cloud Platform account.