Development and Validation of a Machine learning prediction model of respiratory failure within 48 hours of patient admission for COVID-19

  • Authors
  • Douglas Barnaby
  • Jamie S. Hirsch
  • Max Brenner
  • Ping Wang
  • Siavash Bolourani
  • Theodoros Zanos
  • Thomas McGinn
  • Published
  • Journal of Medical Internet Research



Predicting early respiratory failure in COVID-19 can help triage patients to higher levels of care, allocate scarce resources, and reduce morbidity and mortality by appropriately monitoring and treating patients at greatest risk for deterioration. Given the complexity of COVID-19 disease, machine learning (ML) approaches may support clinical decision making for patients with this disease.


Our objective is to derive a machine learning model that predicts respiratory failure within 48 hours of admission based on data from the emergency department (ED).


Data was collected from patients with COVID-19 who were admitted to Northwell Health acute care hospitals and discharged, died, or spent a minimum of 48 hours in the hospital between March 1, 2020 and May 11, 2020. Of 11,525 patients, 933 (8.1%) were placed on invasive mechanical ventilation within 48 hours of admission. Variables used by the models included clinical and laboratory data commonly collected in the ED. We trained and validated three predictive models (two based on XGBoost, one that utilized logistic regression) using cross hospitals validation. We compared model performance between all three models as well as an established early warning score (Modified Early Warning Score (MEWS)) using receiver operating characteristic (ROC) curves, precision-recall (PR) curves, and other metrics.


The XGBoost model had the highest mean accuracy of 0.919 (AUC = 0.77), outperforming the other two models as well as MEWS. Important predictor variables included the type of oxygen delivery used in the ED, patient age, Emergency Severity Index (ESI), respiratory rate, serum lactate, and demographic characteristics.


XGBoost has high predictive accuracy, outperforming other early warning scores. The clinical plausibility and predictive ability of XGBoost suggest that the model could be used to predict 48-hour respiratory failure in admitted patients with COVID-19.