Member-only story

DiCE: Diverse Counterfactual Explanations for Hotel Cancellations

DiCE is part of the broader InterpretML library, and is great at generating “Diverse Counterfactual Explanations” for a particular dataset.

Michael Grogan
TDS Archive
6 min readJul 13, 2020

--

By “Diverse Counterfactual Explanations”, we mean decisions made by a model that would be influential enough to change the outcome variable.

Let’s take an example. Suppose that a hotel manager is analysing customer bookings, and wishes to analyse which types of customers are more likely to cancel their booking.

Source: Jupyter Notebook

Here is an instance where a customer did not cancel their hotel booking.

According to this particular case, the customer belongs to the market segment Offline TA/TO, the customer type is Contract, the Distribution Channel is TA/TO and Required Car Parking Spaces is 0.

However, a hotel manager who is looking to minimise cancellation bookings would ideally like to identify the types of customers who would be likely to cancel their bookings. This is where DiCE comes in.

When looking at the counterfactual explanations above — instances where a customer did cancel their bookings, it is observed that:

  • Lead Time is significantly higher across the four…

--

--

TDS Archive
TDS Archive

Published in TDS Archive

An archive of data science, data analytics, data engineering, machine learning, and artificial intelligence writing from the former Towards Data Science Medium publication.

Michael Grogan
Michael Grogan

Written by Michael Grogan

Statistical Data Scientist | Python and R trainer | Financial Writer | michael-grogan.com

No responses yet