Metadata-Version: 2.4
Name: xai-lab-ese
Version: 1.0.0
Summary: XAI lab ESE: 10 explainable-AI experiments with exam-style code, original lab notebooks and how-to-solve theory with viva questions
Author: Amey Jagannath Sonvadkar
License: MIT
Keywords: xai,explainable-ai,shap,lime,grad-cam,lrp,education
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: lab
Requires-Dist: numpy; extra == "lab"
Requires-Dist: pandas; extra == "lab"
Requires-Dist: matplotlib; extra == "lab"
Requires-Dist: scikit-learn; extra == "lab"
Provides-Extra: all
Requires-Dist: numpy; extra == "all"
Requires-Dist: pandas; extra == "all"
Requires-Dist: matplotlib; extra == "all"
Requires-Dist: scikit-learn; extra == "all"
Requires-Dist: tensorflow; extra == "all"
Dynamic: license-file

# xai-lab-ese

The 10 **XAI lab experiments** as a pip package. Each experiment has:
* **theory — how to solve that type of problem:** exam task, formulas, step-by-step method, worked example with numbers, notes on common mistakes, viva questions;
* **exam code:** short programs to solve the numericals (plain Python, no libraries);
* **lab code:** the original lab notebook code, plus the `.ipynb` itself.

## Install
```bash
pip install --upgrade xai-lab-ese            # theory + exam code (no dependencies)
pip install --upgrade "xai-lab-ese[lab]"     # + numpy, pandas, matplotlib, scikit-learn for the lab notebooks
pip install --upgrade "xai-lab-ese[all]"     # + tensorflow (lab Exp 9)
```
Colab / Jupyter: `!pip install --upgrade xai-lab-ese`

## Command line
```bash
xai-lab-ese --list                     # list the 10 experiments
xai-lab-ese --show lime                # title + theory + exam code
xai-lab-ese --show lime --lab          # ... with the lab-notebook code
xai-lab-ese --show lime --both         # ... with both
xai-lab-ese --theory shapley           # only the theory / how to solve
xai-lab-ese --exam gradcam             # only the exam code
xai-lab-ese --code gradcam             # only the lab-notebook code
xai-lab-ese --save lrp --out lrp.py    # save exam code (add --lab for notebook code)
xai-lab-ese --notebook pdp             # save the original Exp4.ipynb
xai-lab-ese --save-all --out xai_code  # everything: exam/lab .py + .txt, theory, notebooks
xai-lab-ese --run xrai                 # run the exam code (add --lab for the notebook code)
```

## Python
```python
from xai_lab_ese import list_experiments, show_experiment, get_theory, get_exam_code, get_lab_code, save_all

list_experiments()
show_experiment("lime")                 # title, theory, then the exam code
show_experiment("lime", code="lab")     # lab-notebook code instead
print(get_theory("shapley"))
code = get_exam_code("regression")
save_all("xai_code")
```

## Experiments
| # | Name (aliases) | Topic |
|---|---|---|
| 1 | `regression` (exp1, linear_regression, logistic_regression) | Linear & Logistic Regression: R², adjusted R², t-statistic, CI, odds ratios |
| 2 | `decision_tree_knn` (exp2, decision_tree, dt) | Decision Trees (Gini, rules, permutation importance) and KNN |
| 3 | `shapley` (exp3, shap, shapley_value) | Approximate Shapley Value (permutation sampling) |
| 4 | `pdp` (exp4, pdp_importance, partial_dependence) | PDP-Based Feature Importance (numerical & categorical) |
| 5 | `ice` (exp5, ice_plot) | Individual Conditional Expectation (ICE) Plot |
| 6 | `xrai` (exp6, region_attribution, ig) | XRAI (Region-Based Image Attribution) |
| 7 | `gradcam` (exp7, grad_cam) | Grad-CAM |
| 8 | `lime` (exp8) | LIME (Weighted Least Squares surrogate) |
| 9 | `gradient_x_input` (exp9, cbow, gradxinput) | CBOW Word Embeddings and Gradient × Input |
| 10 | `lrp` (exp10, layerwise_relevance) | Layer-wise Relevance Propagation (LRP) |

Experiments can also be selected by number (`1`–`10`) or `exp1`–`exp10`.

See **PUBLISHING.md** for how to upload to PyPI.

## License
MIT
