Skip to content

Practical Implementations of Explainable AI (XAI) techniques for Responsible AI

License

Notifications You must be signed in to change notification settings

alexdevassy/Explainable-AI-XAI-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Explainable AI (XAI) Techniques Demo

Implementations of SHAP and LRP for AI model (tabular & classifier, respectively) explainability.

Requirements

  • Python 3.14.2
  • See requirements.txt for full dependencies

Setup

# Create virtual environment
python -m venv xai_env

# Activate environment
# Windows:
xai_env\Scripts\activate
# macOS/Linux:
source xai_env/bin/activate

# Install dependencies
pip install -r requirements.txt

SHAP Analysis

Real estate price prediction with feature explanations.

Data Source: Unzip california Housing dataset included at SHAP/CaliforniaHousing.zip

folder structure should look like:

├── SHAP/
│   ├── real_estate_price_prediction_shap.py
│   └── CaliforniaHousing.zip
|   └── CaliforniaHousing/
│       ├── cal_housing.data
│       ├── cal_housing.domain
cd SHAP
python real_estate_price_prediction_shap.py

LRP Analysis

Brain MRI tumor classification with pixel-level explanations.

Data Source: Download and Unzip training data from https://www.kaggle.com/datasets/sartajbhuvaji/brain-tumor-classification-mri

folder structure should look like:

├── LRP/
│   ├── buildmodel.py
│   ├── lrp_analysis.py
│   └── data/
│       └── brain_mri/
│       ├── Training/
│       │   ├── glioma_tumor/
│       │   ├── meningioma_tumor/
│       │   ├── no_tumor/
│       │   └── pituitary_tumor/
│       └── Testing/
│           ├── glioma_tumor/
│           ├── meningioma_tumor/
│           ├── no_tumor/
│           └── pituitary_tumor/
cd LRP
# Train model first
python buildmodel.py
# brain_mri_vgg16_finetuned.pth will be created
# Run analysis
python lrp_analysis.py "brain_mri/Testing/meningioma_tumor/image(43).jpg"

About

Practical Implementations of Explainable AI (XAI) techniques for Responsible AI

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages