🧠 trbxai — Trustworthy & Explainable AI for Clinical and Synthetic Health Data (coming soon-Nov2025)
trbxaiis a Python package for interpretable analysis of clinical and synthetically generated health data,
combining SHAP-based explainability and GAN-powered synthetic generation.
Designed for clinical researchers, AI developers, and scientists working with imbalanced, rare, or sensitive datasets.
-
🧬 Synthetic Data Generation (ctGAN)
Generate new, realistic samples based on real clinical datasets. -
🧠 Explainability with SHAP
Visualize the most influential features in your model, per subject or globally. -
📊 SHAPSet Plot (coming soon)
Visualize interactions between feature sets usingshapiq. -
💬 Natural Language Output
Narrative summaries explaining key predictors in plain language.
git clone https://github.com/DanteTrb/trbxai.git
pip install -e .
- Generate synthetic patients
from trbxai.generate.ctgan_generator import generate_synthetic_patients synthetic_df = generate_synthetic_patients(real_df, num_samples=100) 2. Explain model predictions
from trbxai.explain.shapset_explainer import get_shap_values shap_values, explainer = get_shap_values(model, X, feature_names=X.columns.tolist())
You have only 46 patients with hereditary cerebellar ataxia. You want to: Augment the dataset with synthetic patients Train a robust classifier Understand which gait variables predict disease With trbxai, you can do it — in just a few steps.
trbxai/ ├── generate/ # ctGAN module │ └── ctgan_generator.py ├── explain/ # SHAP and explainability module │ └── shapset_explainer.py ├── tests/ # Unit tests with pytest ├── pyproject.toml ├── README.md └── setup.cfg
To run all tests: pytest
🧪 Example notebooks (coming soon, stay tuned)
🧠 Streamlit app integration (in development)
📊 /examples folder will be available soon
Open an issue, submit a pull request, or suggest new features! If you use trbxai in your research, consider citing the repo (BibTeX coming soon).
Distributed under the MIT License.
We aim to make trbxai the go-to library for Explainable AI in clinical research, bridging data science and clinical decision-making with tools that are trustworthy, interpretable and deployable.