Introduction To XAI
This repository provides a range of practical examples and educational resources for exploring the field of Explainable AI (XAI). You'll find examples using tools like LIME and SHAP to interpret machine learning model predictions, making the decision-making processes of complex algorithms more transparent and accessible
Install / Use
npx skills add Naviden/Introduction-to-XAIInstalls into whichever agent you are using.
README
Explainable AI (XAI): Theory, examples, ...
Overview
This repository offers practical examples and educational resources to help you understand Explainable AI (XAI). It includes Jupyter notebooks and Python scripts that demonstrate the use of various XAI frameworks, such as LIME, SHAP, Anchors, Grad-CAM, Integrated Gradients, ALE plots, DiCE, and more. The aim is to provide a hands-on approach to interpreting machine learning model predictions and to shed light on the decision-making processes of complex algorithms.
Contents
Theory/- Jupyter notebooks covering XAI fundamentals: white-box vs. black-box models, surrogate models, global vs. local explanations, and explanation types (plain-fact, counterfactual, contrastive).Tools/- Hands-on examples for various XAI frameworks: LIME (tabular, text, image), SHAP (tabular, summary plots, survival models, text/image), Anchors, RuleFit, MERLIN, PDP/ICE plots, Grad-CAM, Integrated Gradients, ALE plots, Permutation Importance, Attention Visualization, DiCE (counterfactual explanations), and a Feature Importance Comparison.Practice/- Practice notebooks for students to apply XAI techniques.
Getting Started
To explore the examples in this repository, follow these steps:
-
Clone the repository:
git clone https://github.com/Naviden/Introduction-to-XAI.git -
Create a virtual environment with Python 3.11 and install dependencies:
python3.11 -m venv .venv source .venv/bin/activate python -m pip install --upgrade pip setuptools wheel pip install -r requirements.txt -
Download the spacy model (needed for the Anchors notebook):
python -m spacy download en_core_web_sm -
Open the Jupyter notebooks:
jupyter notebook
Contributing
Contributions are welcome! If you'd like to add new examples, enhance existing ones, or suggest additional XAI frameworks to include, please submit a pull request or open an issue.
Related Skills
mcp
Use the `mcp_perplexity-ask_perplexity_search` tools to answer questions. You should use this instead of the `web_search` tool because it is a lot more accurate.
practical-power-systems-synthesis
This skill enables synthesis in the domain of power-systems (engineering). It represents research-level-level expertise and is designed for production use in research, industry, and educational contexts. Use this skill when you need to perform synthesis operations related to power-systems.
semi-supervised-optogenetics-testing
This skill enables testing in the domain of optogenetics (neuroscience). It represents intermediate-level expertise and is designed for production use in research, industry, and educational contexts. Use this skill when you need to perform testing operations related to optogenetics.
data-mining-interpretation-fundamental
This skill enables interpretation in the domain of data-mining (data-science). It represents fundamental-level expertise and is designed for production use in research, industry, and educational contexts. Use this skill when you need to perform interpretation operations related to data-mining.
