Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Relationship-preserving Synthetic Data Generation using Gaussian Copula

Generate high-quality synthetic healthcare data using the Gaussian Copula model and evaluate its usefulness through statistical analysis, visualization, machine learning performance, and privacy assessment.


Project Overview

Access to high-quality datasets is often limited by privacy concerns, especially in healthcare. Synthetic data generation offers a way to create realistic datasets that preserve important statistical properties while reducing the exposure of sensitive information.

This project implements a Gaussian Copula-based approach for generating synthetic tabular healthcare data and evaluates the generated data using multiple quantitative and visual techniques.


Recognition

This project was further developed following an award-winning submission at the AI & Deep Learning Codeathon (2026), where it received Second Prize.


Objectives

  • Generate realistic synthetic tabular data.
  • Preserve statistical properties of the original dataset.
  • Evaluate synthetic data quality using multiple techniques.
  • Compare machine learning performance between original and synthetic datasets.
  • Assess the privacy characteristics of the generated data.

Dataset

The project uses the publicly available Heart Disease dataset.

The dataset used in this project is publicly available and is included in the repository for reproducibility.

The dataset contains clinical attributes such as:

  • Age
  • Sex
  • Chest Pain Type
  • Blood Pressure
  • Cholesterol
  • Maximum Heart Rate
  • ECG
  • ST Depression
  • Heart Disease Target

Methodology

The workflow followed in this project is:

  1. Load and prepare the original dataset.
  2. Automatically detect dataset metadata.
  3. Train a Gaussian Copula synthesizer.
  4. Generate multiple synthetic datasets.
  5. Compare descriptive statistics.
  6. Evaluate downstream machine learning performance.
  7. Compare feature distributions.
  8. Analyze feature correlations.
  9. Perform statistical hypothesis testing (KS Test).
  10. Evaluate privacy using nearest-neighbor analysis.

Repository Structure

synthetic-data-generation/
│
├── notebooks/
│   └── synthetic_data_generation.ipynb
│
├── data/
│   └── heart.csv
│
├── images/
├── results/
│
├── README.md
├── requirements.txt
├── LICENSE
└── .gitignore

Technologies Used

  • Python
  • Pandas
  • NumPy
  • SDV (Gaussian Copula)
  • Scikit-learn
  • Matplotlib
  • Seaborn
  • SciPy

Results

The generated synthetic datasets were evaluated using:

  • Descriptive statistical comparison
  • Distribution visualization
  • Correlation analysis
  • PCA visualization
  • Kolmogorov–Smirnov statistical testing
  • Machine learning performance comparison
  • Privacy evaluation through nearest-neighbor distance analysis

Together, these evaluations provide insight into both the utility and realism of the generated synthetic data.

Sample Results

Distribution Comparison

Distribution Comparison


Correlation Heatmap

Correlation Heatmap


PCA Visualization

PCA Visualization


How to Run

Clone the repository:

git clone https://github.com/Farooq-ro/synthetic-data-generation.git

Install the required libraries:

pip install -r requirements.txt

Open:

notebooks/synthetic_data_generation.ipynb

Run all cells in order.


Future Improvements

Potential future enhancements include:

  • Comparing Gaussian Copula with CTGAN and TVAE.
  • Evaluating additional healthcare datasets.
  • Implementing automated quality metrics.
  • Packaging the workflow into a reusable Python module.
  • Developing a simple web interface for synthetic data generation.

License

This project is released under the MIT License.

About

Privacy-preserving synthetic healthcare data generation using Gaussian Copula with statistical and machine learning evaluation.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages