TDA-Based Pipeline for Missing Data Imputation Quality Evaluation
This repository provides a reproducible pipeline for evaluating the quality of missing-data imputation using Topological Data Analysis (TDA), specifically the Mapper algorithm and permutation-based statistical testing.
Large-scale clinical datasets offer valuable opportunities to understand treatment effectiveness; however, missing data presents a major challenge to drawing reliable conclusions.
This project applies Topological Data Analysis (TDA) to quantitatively assess and compare different imputation strategies.
By examining the topological structures of complete and imputed datasets, the pipeline evaluates how well the imputed data preserves the intrinsic geometry of the original dataset—an essential step in ensuring the integrity and reproducibility of clinical research findings.
The pipeline compares two datasets:
- Complete-case dataset – no missing values
- Imputed dataset – after missing-value imputation
It performs:
- Data standardization and 2D filtering (PCA1 + kNN distance)
- Mapper graph construction using adaptive K-Means clustering
- Computation of topological summaries (connected components, branches, loops)
- Permutation tests to assess statistical significance of structural differences
- Automated report generation (CSV, Markdown, and PKL formats)
-
Expected input files (CSV format): complete_case.csv imputed_data.csv
-
Each file must have the same set of feature columns (with matching headers).
-
The pipeline automatically handles standardization and filtering.
python -m venv .venv
# Windows
.\.venv\Scripts\activate
# macOS / Linux
source .venv/bin/activate
pip install -r requirements.txt
python TDA_pipeline_kmeans_pca.py
Summary CSV, Markdown report, and full PKL are saved to: run_reports/
Temporary caches for parallel computations are stored in: cache/ Both folders are ignored by Git to keep the repository lightweight.
tda-imputation-mapper/
├── TDA_pipeline_kmeans_pca.py # Main analysis pipeline
├── requirements.txt # Dependencies
├── README.md # Project documentation
├── .gitignore # Ignore cache & results
├── run_reports/ (ignored) # Output reports
└── cache/ (ignored) # Temporary computation cache
This project is released under the MIT License.
Yiyang Ge
Email: yiyang.ge.0@kcl.ac.uk
Raquel Iniesta
Email: raquel.iniesta@kcl.ac.uk
