DOI: 10.5281/zenodo.14227986
title: Artificial Intelligence Identifies Individuals with Prediabetes from Single-Lead Electrocardiograms

description: Contents



codes.zip



For ECG feature extraction (this will need original ECG signal data)



ecg_feature_extraction.sh

ecg_feature_extraction.py

feature_extractor.py



For training with hyperparameter optimization



train.sh

train.py



For prediction of prediabetes/diabetes from ECG feature



test.sh

test.py





raw_ecg_data.zip: 16,766 ECG records used in our analyses. Each record is a 5,000 x 12 matrix in a CSV file.  (In this dataset, value 1 represents 4.88 µV.)

external_ecg_data.zip: 2,456 ECG records used in our external validation. Each record is a 5,000 x 12 matrix in a CSV file. (In this dataset, value 1 represents 1 µV.)

participant_characteristics.csv: Health check records of 16,766 participants where the information below are stored.



participant_id: IDs for participant. Some IDs are duplicated because the dataset contains multiple records from some of the participants.

ecg_id: IDs for ECG records, all of which are unique

age: The age of each participant at the time of the health checkup

male_sex: If the participant is male, "True" is recorded

smoking: if the participant smokes, "True" is recorded

drinking: 1 for "rarely", 2 for "occasionally" and 3 for "regularly" is recorded according to the frequency of drinking

height: participant's height in centimeters (cm)

weight: participant's body weight in kilograms (kg)

BMI: body mass index, calculated using the formula: weight (kg) / [height (m)]^2

pulse_rate:  pulse rate in pulse per minute (/min)  

sBP: systolic blood pressure in mmHg

dBP: diastolic blood pressure in mmHg

FPG: fasting plasma glucose levels measured in milligrams per deciliter (mg/dL)

HbA1c: hemoglobin A1c levels in %

dm_under_treatment: if the participant was undergoing treatment for known diabetes, "True" is recorded

prediabetes_diabetes: classification label which is "True" if a participant meet either of the following criteria



FPG ≥ 110 mg/dL

HbA1c ≥ 6.0%

Undergoing treatment for diabetes



development_data: "True" in records used as development data in our study



external_cohort_characteristics.csv: Health check records of 2,456 participants where the information below are stored.



ecg_id: IDs for ECG records, all of which are unique

prediabetes_diabetes: classification label which is "True" if a participant meet either of the following criteria



FPG ≥ 110 mg/dL

HbA1c ≥ 6.0%

Undergoing treatment for diabetes



FPG: fasting plasma glucose levels measured in milligrams per deciliter (mg/dL)

HbA1c: hemoglobin A1c levels in %

dm_under_treatment: if the participant was undergoing treatment for known diabetes, "True" is recorded



ecg_feature_data.zip: extracted ECG features (unprocessed), for 12-lead and 1-lead ECG



ecg_features_1-lead.csv    [Single-lead (lead I) ECG]

ecg_features_12-lead.csv  [12-lead ECG]

ecg_features_12-leads_external_cohort.csv  [12-lead ECG of external cohort]



feature_list.zip: List of ECG features used (to be used for ECG extraction for original data)



feature_list_269_12-lead.csv   [269 features for 12-lead ECG analysis]

feature_list_28_1-lead.csv     [28 features for single-lead (lead I) analysis]



model_12-lead.zip, model_1-lead.zip: model trained with our 12-lead or single-lead (lead I) ECG data, and the classification thresholds, used for test



model_fold_1.pkl - model_fold_10.pkl : model for each of 10-fold cross validation

average_threshold.pkl : classification threshold, which is the average of 10-fold




Codes and data for demo are also available in (https://github.com/dkoga4116/diabetes_detector)