Skip to content
alphanumericslabPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

26 Commits

Folders and files

Repository files navigation

ECG-Age for Cardiovascular Outcome Prediction: Evaluation in an Adult Congenital Heart Disease Cohort

GitHub DOI Python MATLAB Computing in Cardiology Conference 2026, Spain

Seyedeh Somayyeh Mousavi1, Cheryl L. Raskind-Hood2, Alexandra Haffner3, Gari D. Clifford1,4,5,6, Wendy M. Book2,3, Reza Sameni1,4

1 Dept. of Biomedical Informatics, Emory University, Atlanta, GA, USA
2 Dept. of Epidemiology, Rollins School of Public Health, Emory University, Atlanta, GA, USA
3 Dept. of Medicine, Emory University, Atlanta, GA, USA
4 Dept. of Biomedical Engineering, Georgia Institute of Technology, Atlanta, GA, USA
5 Dept. of Biomedical Engineering, Johns Hopkins University, Baltimore, MD, USA
6 Dept. of Anesthesia & Critical Care Medicine, Johns Hopkins University, Baltimore, MD, USA

🔗 Links

📌 Overview

ECG-Age has become popular because AI models can look at an ECG and predict an apparent age (how healthy or sick a subject's heart is). Differences between ECG-Age and chronological age have been linked to cardiovascular risk, but there is an important interpretability question: is ECG-Age really a physiological biomarker, or is it a convenient summary of age-related ECG characteristics, or simply a regression to age?

We approached this by building an interpretable ECG-Age model based on engineered ECG features rather than a black-box deep network, and then applied it to a large adult congenital heart disease cohort. Our ECG-Age model performs very closely to the state-of-the-art deep models, while it is explainable and we can identify which characteristics of the ECG the model is inferring from. There are three main take-home messages:

  • First, ECG-Age is strongly model dependent. Different models can perform similarly at the population level while giving substantially different age estimates for the same individual. So an ECG-Age difference of, say, 50 or 60 years should not automatically be interpreted as a unique biological measurement of cardiac aging vs. a subject's actual age.

  • Second, in congenital heart disease, the ECG clearly contains information related to disease burden. On average, ECG-Age tends to look older than chronological age, particularly in younger patients, and the pattern differs across anatomical groups, with the single-ventricle population showing the most distinct pattern (they tend to have shorter lives in clinical studies).

  • Third, for predicting future adverse outcomes, the original ECG features are more informative than summarizing all of that information into a single ECG-Age number. ECG-Age adds information beyond demographics alone, but once the ECG features are available to a machine learning model, it adds essentially no additional information.

So our overall conclusion is: ECG-Age can be a useful summary of ECG abnormalities, but we should be cautious about treating it as a biomarker or an independent measure of biological cardiac age. For clinical prediction, the underlying ECG characteristics may be considerably more valuable than a single regression to age.

📁 Structure of the Repository

This repository contains the best-performing pretrained ECG-Age estimation model, sample extracted ECG features, and codes to run the model and generate age predictions.

.
├── codes/
│   └── matlab_scripts/
│   │   └── test_script_extract_features.m                    # Extract ECG features
│   └── python_scripts/
│       ├── merging_feature_csv_files.ipynb                   # Merge ECG features and add demographic info (age and sex) to the feature set
│       └── predicting_ecg_age_and_evaluating.ipynb           # Predict ECG-age and evaluate the results                         
│
├── features/
│   ├── leadwise_features/                                    # Lead-wise feature CSV files (sample dataset)
│   └── multilead_features/                                   # Multi-lead feature CSV files (sample dataset)
│
├── model_and_metadata/
│   ├── best_model_catboost_ml_cinc2026.pkl                   # Best-performing pretrained ECG-age model
│   └── inference_mode_pretrained_model_outputs_cinc2026.csv  # Model outputs
│
└── requirements.txt                                          # Python package requirements
│
├── sample_data/                                              # Sample test data and .csv file includes demographic features of the records (age and gender)
│
└── README.md

⚙️ Requirements

This project requires:

  • MATLAB for ECG feature extraction
  • Python 3.11 or later for running the model

Python setup

  1. Open a terminal and check that Python 3.11 or later is installed:
   python --version
  1. Create a virtual environment:
   python3.11 -m venv venv_cinc2026
  1. Activate the virtual environment:
   # macOS / Linux
   source venv_cinc2026/bin/activate

   # Windows
   venv_cinc2026\codes\activate
  1. Install the required packages:
   pip install -r requirements.txt
  1. Register the environment as a Jupyter kernel, so you can select it in your notebooks:
   python -m ipykernel install --user --name cinc2026

MATLAB setup

Clone the Open-Source Electrophysiological Toolbox (OSET) and add it to your MATLAB path to extract the ECG features:

git clone https://github.com/alphanumericslab/OSET.git

Then, in MATLAB:

addpath(genpath('path/to/OSET'));

Running the pretrained model

  1. Prepare your dataset: All ECG records must be in WFDB format and stored in a single folder (for example: sample_data).
  2. Consider an output folder: Consider a folder to save the extracted .csv files (for example: features).
  3. Extract features: Run the feature extraction script extract_features.m in MATLAB.
  4. Merge feature files: Run merge_features.py to combine all extracted feature CSV files into a single file and add sex information to it.
  5. Predict ECG-Age and evaluate the results: Run predict_and_evaluate_ECG_age.py to generate ECG-Age and investigate the results.

Note

  • The ECG-Age model is sex-aware: sex is a required input, so it must be provided for each record.
  • For more information about the OSET-ECG feature extraction toolbox and its applications, please see our recent papers:
    1. Estimating Blood Pressure from the Electrocardiogram: Findings of a Large-Scale Negative Results Study. Physiological Measurement, Nov. 2025.
    2. Electrocardiogram-Based Machine Learning Model for Predicting Adverse Cardiac Outcomes in Adult Congenital Heart Disease. Under review, May 2026.

Corresponding authors:

For questions about this project, please contact

Citation

If you use this code in your research, please cite our paper:

Mousavi SS, Raskind-Hood CL, Haffner A, Robichaux C, Ivey LC, Clifford GD, M Book W, and Sameni R. "ECG-Age for Cardiovascular Outcome Prediction: Evaluation in an Adult Congenital Heart Disease Cohort." In Computing in Cardiology Conference (CinC), Sep 2026.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages