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
.ipynbitself.
Install
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
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
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
Metadata
Release files for xai-lab-ese 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| xai_lab_ese-1.0.0.tar.gz | 283.9 kB | Without provenance | Details for xai_lab_ese-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| xai_lab_ese-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for xai_lab_ese-1.0.0-py3-none-any.whl |
Total release size: 578.0 kB
Release files / xai_lab_ese-1.0.0.tar.gz
| Download URL | xai_lab_ese-1.0.0.tar.gz |
|---|---|
| Size | 283.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3fbb02267d072a4b03b6dc13b873082583a1c0f80af91776a10a3b2d9918d679
|
|
BLAKE2b-256 checksum How to use checksums |
5928f8b8a3c5f657dc0c8805e1093e468643e042465454ec2778bbd68f761fce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.15.0
|
Release files / xai_lab_ese-1.0.0-py3-none-any.whl
| Download URL | xai_lab_ese-1.0.0-py3-none-any.whl |
|---|---|
| Size | 294.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
077e9310241d8a26f0b81dfd1ad36cd1d744835804f7913e78db4ac3d946f1a0
|
|
BLAKE2b-256 checksum How to use checksums |
6d596ed9930270edf737d7ec7185048c81cde20f8e38d1224c8a9e0f33682dbc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.15.0
|
Security for xai-lab-ese 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.