Use cases notebooks¶
Welcome to the interactive notebooks section, dedicated to showcase Explainable Artificial Intelligence (XAI) techniques in various use cases.
These notebooks aim to make XAI more approachable by providing practical examples and explanations. We have curated a diverse range of notebooks for audiences with varying levels of expertise.
Explore our collection of notebooks to understand how AI models make decisions, interpret their outputs, and gain insights into their predictions.
There are 2 categories of notebooks:
- Tutorials: Explore various notebooks illustrating practical uses of XAI techniques in different machine learning scenarios.
- Use cases: Focus on a particular goal-oriented ML task with notebooks demonstrating the integration of XAI techniques for greater interpretability.
To launch the notebooks, refer to Using notebooks.
Warning
Important: To run the notebook on Google Colab successfully, ensure to change the variable use_colab
in the first cell to True.
Tutorials¶
Class Activation Maps (CAM)¶
Through this use case, we present the potential of CAM as a tool for transparent and interpretable sport image classification.
Sport Image Classification with Class Activation Maps (CAM)
Class Activation Maps (CAM)
- Online: Exploring Class Activation Maps for Sport Image Classification
- Local: Docker Compose file (Right click, "Save link as")
In this use case, we dive into sport image classification and showcase the power of Class Activation Maps (CAM) as an interpretability tool.
CAM allows us to visualize the regions of an image that contribute most to the model's classification decision. By overlaying heatmaps onto the original images, we gain insights into the model's attention and its understanding of different sports.
While focusing on a specific image classification task using a pre-trained model, our goal is to demonstrate how XAI empowers users to explore and interpret image classifiers effectively.
By the end of this use case, you will have a solid understanding of CAM and how to integrate it into your own projects.
Rules Extraction¶
Through this use case, we aim to present the potential of Rules Extraction package as a tool for transparent and interpretable sport image classification.
Sport Image Classification with Rules Extarction
Rules Extraction
- Online: Exploring Rules Extraction for Sport Image Classification
- Local: Docker Compose file (Right click, "Save link as")
In this use case, we dive into the same specific sport image classification task using a pre-trained model. We demonstrate the power of Rules Extraction as an interpretability tool, allowing to explore and interpret image classifiers effectively.
By the end of this notebook, you will have a solid understanding of Rules Extraction and how to integrate it into your own projects.
Feature Visualisation¶
Through this use case, we aim to present the potential of Feature Visualisation as a tool for transparent and interpretable sport image classification.
Sport Image Classification with Feature Visualisation
Feature Visualisation
- Online: Exploring Feature Visualisation for Sport Image Classification
- Local: Docker Compose file (Right click, "Save link as")
In this use case, we dive into the same specific sport image classification task using a pre-trained model. We demonstrate the power of Feature Visualisation as an interpretability tool, allowing to explore and interpret image classifiers effectively.
By the end of this notebook, you will have a solid understanding of Feature Visualisation and how to integrate it into your own projects.
Use Cases¶
APTOS 2019 Blindness Detection¶
Through this use case, we aim to to show how to use XAI techniques and methods to create an explainable model to classify images from the APTOS 2019 Blindness Detection dataset. We also builds post-hoc local and global explanations to explain the model and its prediction.
We used the MLxplain package that we developed to put together our explainability methods and the omniXAI explainers.
APTOS 2019 Blindness Detection
APTOS 2019 Blindness Detection
- Online: XAI for APTOS 2019 Blindness Detection
- Local: Docker Compose file (Right click, "Save link as")
Sport Image Classification¶
Through this use case, we aim to to show how to use XAI techniques and methods to create an explainable model to classify images from the Sports Image Classification dataset. We also builds post-hoc explanations to explain the model and its prediction.
Sport Image Classification
Sports Image Classification
- Online: XAI for Sport Image Classification
- Local: Docker Compose file (Right click, "Save link as")
MNIST¶
Through this use case, we aim to to show how to use XAI techniques and methods to create an explainable model to classify images from the MNIST dataset. We also builds post-hoc explanations to explain the model and its prediction.
MNIST Image Classification
MNIST Image Classification
- Online: XAI for MNIST
- Local: Docker Compose file (Right click, "Save link as")
Cracks¶
Through this use case, we aim to show how to use XAI techniques and methods to create an explainable model to classify images from cracked concrete image dataset. We also builds post-hoc explanations to explain the model and its prediction.
Cracks Image Classification
Cracks Image Classification
- Online: XAI for Cracks Images Classification
- Local: Docker Compose file (Right click, "Save link as")
Breast cancer classification¶
Through this use case, we demonstrate how to use Dimlp to train a model based on breast cancer tumors dataset and the Fidex algorithms to extract rules.
Breast cancer classification
Breast cancer classification
- Online: XAI for Breast cancer classification
- Local: Docker Compose file (Right click, "Save link as")
Obesity Cardiovascular risk classification¶
As an alternative to the previous notebook, this use case aims to use a different dataset and training model to show the versatility of our explainability tools. In addition, we will cover how to pre-process a dataset that is not initially usable by a model and convert it to an exploitable dataset.
Obesity Cardiovascular Risk Classification
Obesity Cardiovascular Risk Classification
- Online: XAI for Obesity Cardiovascular Risk Classification
- Local: Docker Compose file (Right click, "Save link as")
Use dimlpfidex within the OmniXAI library¶
Through this use case, learn to use dimlpfidex with OmniXAI by exploring the heart attack prediction dataset and extracting explanatory rules. We will also generate local and global explanation graphs in a dashboard using this library.
Heart attack prediction with OmniXAI
Heart Attack Risk Prediction
- Online: XAI for Heart Attack Risk Prediction
- Local: Docker Compose file (Right click, "Save link as")
Generate dimlpfidex JSON configuration files with the GUI¶
Info
You should install the GUI before following this notebook.
If you are not used to deal with JSON configuration files and would like to get over it as fast as possible, a GUI is available to help you. Through this short notebook, you will learn how to generate a configuration file using this app and input it in one of the Fidex algorithms.
Dimlpfidex GUI
Dimlpfidex GUI
- Online: Learn how to use the Dimlpfidex Graphical User Interface (GUI)
- Local: Docker Compose file (Right click, "Save link as")