Machine Learning Prediction of the Total Duration of Invasive and Non-invasive Ventilation During Icu Stay

Emma Schwager, Xinggang Liu, Mohsen Nabian, Ting Feng, Robin MacDonald French, Pam Amelung, Louis Atallah , Omar Badawi


Predicting the duration of ventilation in the ICU helps in assessing the risk of ventilator-induced lung injury, ensuring sufficient oxygenation, and optimizing resource allocation. Prior models provided a prediction of total duration without distinguishing between invasive and non-invasive ventilation. This work proposes two independent gradient boosting regression models for predicting the duration of invasive and non-invasive ventilation based on commonly available ICU features. These models are trained on 2.6 million patient stays across 350 US hospitals between 2010 to 2019. The mean absolute error (MAE) for the prediction of duration was 2.08 days for invasive ventilation and 0.36 days for non-invasive ventilation.


Mechanical ventilation is a lifesaving intervention for critically ill patients in intensive care units (ICUs). Proper ventilation management aims to provide patients with sufficient oxygenation while avoiding detrimental effects such as lung injury or infection. Deciding on the optimal ventilation strategy, including ventilation mode, settings and duration of ventilation for patients can be challenging. Longer durations of ventilation can increase patient risk for ventilator-associated complications, including mortality [1] whereas delays in intubation can carry significant risk [2,3]. On the other hand, non-invasive ventilation is increasingly used to mitigate or supplement the use of invasive mechanical ventilation [4,5].

Materials and method

In this study we developed two machine learning models to predict the total duration of invasive ventilation and total duration of non-invasive ventilation. The development process involved extracting patient data, defining and extracting features, model training and model performance evaluation.


Among the stays used to develop the duration predictions, receiving invasive ventilation was substantially more common (~600K stays received invasive ventilation; ~260K received non-invasive ventilation). Stays in the invasive ventilation cohort had longer durations (median 2.09 days vs. 1.33 days) and higher mortality (ICU mortality 13.5% vs. 8.7%). Patients in the non-invasive ventilation cohort were slightly older (Mean of 66.7 years vs. 62.5 years).


The use of mechanical ventilation is vital to provide sufficient oxygenation for critically ill patients with respiratory failure [18]. However, the excessive use of ventilation may induce permanent lung injuries [19–21] and infection, and therefore should be avoided where unnecessary. It is also critical to utilize efficient ventilation management to optimize resources, especially when demand may significantly surpass available resources such as during pandemics. The new ventilation models predicting the duration of mechanical ventilation using patients’ information at the ICU level may contribute to addressing some of these issues.


In conclusion, two machine learning models for predicting the duration of invasive and non-invasive mechanical ventilation were presented. To develop these models, we used a very large heterogeneous sample of US-based hospitals with automated electronic data collection of critically ill patients. We showed that our proposed ventilation models outperform APACHE IVa and APACHE IVb as well as other published models in predicting the total ventilation duration. These models can be used retrospectively as a benchmarking tool for hospitals. Further research is needed to explore if these models can also be used prospectively as clinical decision support tools for critically ill patients requiring mechanical ventilation.

Citation: Schwager E, Liu X, Nabian M, Feng T, French RM, Amelung P, et al. (2023) Machine learning prediction of the total duration of invasive and non-invasive ventilation During ICU Stay. PLOS Digit Health 2(9): e0000289.

Editor: Nadav Rappoport, Ben-Gurion University of the Negev, ISRAEL

Received: January 17, 2023; Accepted: May 30, 2023; Published: September 13, 2023

Copyright: © 2023 Schwager et al. This is an open access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.

Data Availability: To develop the model described in the paper, we have used Philips-owned data of around 4 million patients recorded from 2010 up to 2021. This dataset is acquired from US-based Tele-ICU customers who agreed to share their data with Philips for Research. Given the nature of the contracts with these customers, the full dataset cannot be shared publicly. However, we have publicly shared a subset of the dataset, including 200K patients, as part our collaboration with MIT via Physionet: The readers can easily download this dataset and replicate many of the results in this work. A more recent dataset will be shared on the same website including 200K patients from 2020 and 2021. This more recent data was not used in this work, due to the COVID-19 pandemic. Interested researchers are welcome to submit a data access request on:

Funding: The authors received no specific funding for this work.

Competing interests: The authors have declared that no competing interests exist.

Harvard Medical School - Leadership in Medicine Southeast Asia47th IHF World Hospital CongressHealthcare CNO Summit - USAHealthcare CMO Summit - USA