Accepted for/Published in: JMIR Formative Research
Date Submitted: Jun 12, 2025
Date Accepted: Nov 21, 2025
Prediction of Respiratory Decompensation in Patients Under Home Mechanical Ventilation: Machine Learning Model Development and Validation.
ABSTRACT
Background:
Chronic respiratory diseases often require long-term ventilatory support, leading to a growing number of patients treated with home mechanical ventilation (HMV). Despite advancements in telemonitoring with real-time tracking of non-invasive mechanical ventilation (NIMV) enabled by integrated software in HMV devices, early signs of respiratory decompensation may go unnoticed, leading to emergency visits and hospitalizations, which burden both patients and healthcare systems.
Objective:
The objective of this study is to develop and evaluate a machine learning-based model capable of predicting respiratory decompensation events, defined as emergency visits and hospitalizations, using data from HMV telemonitoring platforms, with the aim of improving patient outcomes.
Methods:
This retrospective study analyzed data from 482 HMV patients monitored via ResMed, Philips, and Breas platforms, collected between March 2021 and November 2024 at Germans Trias i Pujol Hospital in Catalonia (HUGTiP), Spain. Data included device usage, compliance, mask leakage, and ventilator settings. Decompensation was defined as emergency department visits or hospitalizations. A windowing strategy captured the five weeks prior to events. Multiple machine learning models were trained using grid search to identify the optimal hyperparameters, prioritizing recall in order to minimize false negatives. Models were evaluated using 10-fold cross-validation. Finally, Shapley additive explanations (SHAP) were used for model interpretability.
Results:
The final dataset included 157 data windows, balanced for positive and negative cases. Among the models tested, logistic regression (LR) achieved the highest recall (0.94 ± 0.06) though with moderate accuracy (0.60 ± 0.05). The random forest classifier (RFC) achieved the best balance across metrics (accuracy: 0.66 ± 0.10; recall: 0.78 ± 0.15; F1 score: 0.70 ± 0.10). SHAP analysis revealed that higher usage, leakage, and compliance in the week before a decompensation event were key predictors, suggesting compensatory behavior or early clinical deterioration. Overall performance remained moderate, reflecting limitations in sample size, incomplete longitudinal records for daily data, and the absence of key physiological measurements.
Conclusions:
This study demonstrates the feasibility of predicting respiratory decompensation using data from HMV telemonitoring systems. Tree-based ensemble models, particularly random forests, provided the most balanced performance, while SHAP analysis offered clinically relevant insights. Although performance was moderate, the findings support further development of predictive tools to enable timely telemedical interventions. Limitations include sample size, missing physiological parameters, and single-center design. Future research should expand to multicenter datasets and incorporate additional clinical variables to enhance model robustness and generalizability.
Citation
Request queued. Please wait while the file is being generated. It may take some time.
Copyright
© The authors. All rights reserved. This is a privileged document currently under peer-review/community review (or an accepted/rejected manuscript). Authors have provided JMIR Publications with an exclusive license to publish this preprint on it's website for review and ahead-of-print citation purposes only. While the final peer-reviewed paper may be licensed under a cc-by license on publication, at this stage authors and publisher expressively prohibit redistribution of this draft paper other than for review purposes.