Machine learning-based risk prediction for major adverse cardiovascular events in a Brazilian hospital: Development, external validation, and interpretability

PLoS One. 2024 Oct 11;19(10):e0311719. doi: 10.1371/journal.pone.0311719. eCollection 2024.

Abstract

Background: Studies of cardiovascular disease risk prediction by machine learning algorithms often do not assess their ability to generalize to other populations and few of them include an analysis of the interpretability of individual predictions. This manuscript addresses the development and validation, both internal and external, of predictive models for the assessment of risks of major adverse cardiovascular events (MACE). Global and local interpretability analyses of predictions were conducted towards improving MACE's model reliability and tailoring preventive interventions.

Methods: The models were trained and validated on a retrospective cohort with the use of data from Ribeirão Preto Medical School (RPMS), University of São Paulo, Brazil. Data from Beth Israel Deaconess Medical Center (BIDMC), USA, were used for external validation. A balanced sample of 6,000 MACE cases and 6,000 non-MACE cases from RPMS was created for training and internal validation and an additional one of 8,000 MACE cases and 8,000 non-MACE cases from BIDMC was employed for external validation. Eight machine learning algorithms, namely Penalized Logistic Regression, Random Forest, XGBoost, Decision Tree, Support Vector Machine, k-Nearest Neighbors, Naive Bayes, and Multi-Layer Perceptron were trained to predict a 5-year risk of major adverse cardiovascular events and their predictive performance was evaluated regarding accuracy, ROC curve (receiver operating characteristic), and AUC (area under the ROC curve). LIME and Shapley values were applied towards insights about model interpretability.

Findings: Random Forest showed the best predictive performance in both internal validation (AUC = 0.871 (0.859-0.882); Accuracy = 0.794 (0.782-0.808)) and external one (AUC = 0.786 (0.778-0.792); Accuracy = 0.710 (0.704-0.717)). Compared to LIME, Shapley values suggest more consistent explanations on exploratory analysis and importance of features.

Conclusions: Among the machine learning algorithms evaluated, Random Forest showed the best generalization ability, both internally and externally. Shapley values for local interpretability were more informative than LIME ones, which is in line with our exploratory analysis and global interpretation of the final model. Machine learning algorithms with good generalization and accompanied by interpretability analyses are recommended for assessments of individual risks of cardiovascular diseases and development of personalized preventive actions.

Publication types

  • Validation Study

MeSH terms

  • Aged
  • Algorithms
  • Brazil / epidemiology
  • Cardiovascular Diseases* / epidemiology
  • Female
  • Hospitals
  • Humans
  • Machine Learning*
  • Male
  • Middle Aged
  • Reproducibility of Results
  • Retrospective Studies
  • Risk Assessment / methods
  • Risk Factors

Grants and funding

PMAM, GYS and HVC were financed by The São Paulo Research Foundation (FAPESP) - Grants #2021/06137-4, #2022/16683-9, #2023/01695-4. PMAM is also supported by The Brazilian National Council for Scientific and Technological Development (CNPq) Grant #302480/2022-6. MS, SJ, DK and PPR were financed by ERA PerMed funded project PRECARE-ML (Reference number: ERAPERMED2021-219). https://fapesp.br/https://www.gov.br/cnpq/pt-brhttps://erapermed.isciii.es/ The funders had no role in study design, data collection and analysis, decision to publish, or manuscript preparation.