Code for building and evaluating QLDT+ trees (quantum‑logic inspired decision trees) and CART baselines on public datasets (Pima, Transfusion, Heart).
- Python 3.10–3.11
- Graphviz runtime for PNG export
# conda
conda env create -f environment.yml
conda activate qldt
# or pip
python -m venv .venv
# Windows: .venv\Scripts\activate
source .venv/bin/activate
pip install -r requirements.txtEither put original CSVs into data/raw/ using these exact names:
pima-indians-diabetes.data.csvtransfusion.csvheart.csv
or run the fetcher:
python scripts/fetch_data.py --allpython src/run_qldt.py --dataset pima --grid --draw
python src/run_qldt.py --dataset transfusion --draw
python src/run_qldt.py --dataset heart --drawOutputs appear in artifacts/:
qldt_*.png,cart_*.pngqldt_param_grid_search_results.csvqldt_interpretability_table.htmlqldt_feature_importance.png
QLDT-Plus/
├─ src/
│ ├─ qldtplus.py
│ ├─ run_qldt.py
│ ├─ utils_io.py
│ └─__init__.py
├─ data/
│ ├─ sample/ # tiny csvs (optional)
│ └─ raw/ # full datasets (gitignored)
├─ artifacts/ # figures/csv/html outputs
├─ scripts/
│ └─ fetch_data.py
├─ tests/
│ └─ test_smoke.py
├─ environment.yml
├─ requirements.txt
├─ .gitignore
├─ .gitattributes # (Git LFS)
└─ README.md
- Fixed random seeds where applicable.
- Balanced splits.
- Regenerates all figures with the commands above.
This project is released under the MIT License (Simplified Attribution Version).
© 2025 Zahra Sheikh Najdi
You are free to use, modify, and distribute this software,
provided that proper credit is given to the author:
"Developed by Zahra Sheikh Najdi (2025)"
See the LICENSE file for full details.