AUTHOR=Castel-Feced Sara , Aguilar-Palacio Isabel , Malo Sara , González-García Juan , Maldonado Lina , Rabanaque-Hernández María José TITLE=Prediction of cardiovascular risk using machine-learning methods. Sex-specific differences JOURNAL=Frontiers in Cardiovascular Medicine VOLUME=Volume 12 - 2025 YEAR=2025 URL=https://www.frontiersin.org/journals/cardiovascular-medicine/articles/10.3389/fcvm.2025.1579947 DOI=10.3389/fcvm.2025.1579947 ISSN=2297-055X ABSTRACT=BackgroundMachine learning (ML) algorithms offer some advantages over traditional scoring systems to assess the influence of cardiovascular risk factors (CVRFs) on the risk of major cardiovascular event (MACE), and could be useful in clinical practice. These algorithms can also be trained using a growing body of real world data (RWD). The aim of the study was to evaluate the MACE risk applying the XGBoost and Random Forest ML algorithms to RWD, stratifying the study population by sex, comparing the outcomes of these two algorithms.MethodsThe follow-up period of the study was from 2018 to 2020. For each algorithm, 3 models were generated, including age and different combinations of three groups of variables: blood test and blood pressure measurements; CVRFs; and medication adherence.ResultsIn this study, 52,393 subjects were included, of whom 581 suffered a MACE. The incidence of MACE was 1% in women and 1.3% in men. The most prevalent CVRF was hypertension, followed by hypercholesterolaemia in both sexes. Adherence to treatment was highest for antihypertensives and lowest for antidiabetics. In all models age was the greatest relative contributor to the risk of MACE, followed by adherence to antidiabetics. Adherence to treatment proved to be an important variable in the risk of having a MACE. Moreover, similar performance was found for RF and XGBoost algorithms.ConclusionThese findings support the use of ML to assess cardiovascular risk and guide personalized prevention strategies in primary care settings.