The goal of this repository is to explore various Explainable AI (XAI) methods on models trained on an classification task on the UCI ML - Statlog (Heart) Data Set.
- Make sure that Python 3.6 and pip are installed in your system
- Install the required dependencies:
pip install -r requirements.txt
- Start jupyter:
jupyter notebook notebooks
- Open the url shown in the output of the previous command in your webbrowser
- Build the docker image:
docker build -t xai-statlog-heart .
- Run the image:
docker run -p 8888:8888 xai-statlog-heart
- Open the url shown in the output of the previous command in your webbrowser
In the notebooks
folder you'll find the following notebooks:
01-data_exploration.ipynb
This notebook contains a short exploratory analysis of the UCI ML - Statlog (Heart) Data Set.
02-data_preprocessing.ipynb
Running this notebook transforms the original dataset (data/raw/heart.dat
) into a collection of transformed datasets which are used in the subsequent notebooks (data/processsed
).
03-classifier_evaluation.ipynb
Here we evaluate different classification algorithms on the dataset and chose the three best performing to create an ensemble classifier which is used in the remaining two notebooks.
04-fold_interpretation.ipynb
Uses 3-Fold cross validation to train three different classifiers and compares the explanations retrieved for each using the following methods:
- PDP - Partial Dependence Plots
- ICE - Individual Conditional Expectation Plot
- ALE - Accumulated Local Effects Plot
- Global Surrogate Model
- Example-Based Model
05-good_versus_bad_model.ipynb
Compares the explanations listed above between the original classifier and one that has been adapted to perform worse.
This repository contains a modified version of ALEPython.