RESUMO
OBJECTIVE: To describe the results of the application of a Machine Learning (ML) model to predict in-hospital cardiac arrests (ICA) 24 hours in advance in the hospital wards. DESIGN: Retrospective observational cohort study. SETTING: Hospital Wards. PATIENTS: Data were extracted from the hospital's Electronic Health Record (EHR). The resulting database contained a total of 750 records corresponding to 620 different patients (370 patients with ICA and 250 control), between may 2009 and december 2021. INTERVENTIONS: No. MAIN VARIABLES OF INTEREST: As predictors of ICA, a set of 28 variables including personal history, vital signs and laboratory data was employed. MODELS: For the early prediction of ICA, predictive models based on the following ML algorithms and using the mentioned variables, were developed and compared: K Nearest Neighbours, Support Vector Machine, Multilayer Perceptron, Random Forest, Gradient Boosting and Custom Ensemble of Gradient Boosting estimators (CEGB). EXPERIMENTS: Model training and evaluation was carried out using cross validation. Among metrics of performance, accuracy, specificity, sensitivity and AUC were estimated. RESULTS: The best performance was provided by the CEGB model, which obtained an AUC = 0.90, a specificity = 0.84 and a sensitivity = 0.81. The main variables with influence to predict ICA were level of consciousness, haemoglobin, glucose, urea, blood pressure, heart rate, creatinine, age and hypertension, among others. CONCLUSIONS: The use of ML models could be of great support in the early detection of ICA, as the case of the CEGB model endorsed, which enabled good predictions of ICA.