This study was reviewed and approved by the Ethics Committee of Taizhou Cancer Hospital. Written informed consent was obtained from all participants before data collection, in accordance with institutional and national ethical standards. The reagents and the software used are listed in the Table of Materials.
1. Workflow overview
The end-to-end workflow for processing structured clinical data with XGBoost is shown in Figure 1 and includes feature ingestion, tree construction, residual updates, regularization, and evaluation. The preprocessing and sequence-modeling workflow for remote monitoring data with LSTM is shown in Figure 2, encompassing 10-min resampling, gap handling, 7-day non-overlapping windowing, network architecture, and inference.
2. Patient recruitment and demographics
Patients were recruited consecutively from outpatient clinics and inpatient wards at Taizhou Cancer Hospital between March 2023 and January 2024. Inclusion criteria were a confirmed COPD diagnosis according to GOLD criteria (FEV1/FVC < 70%), a stable condition at enrollment, and age between 40 and 80 years. Exclusion criteria included severe comorbidities such as lung cancer, uncontrolled cardiovascular disease, or cognitive impairment preventing informed consent. A total of 214 patients were enrolled (mean age 63.7 ± 8.9 years; 68% male; 54% current or former smokers).
3. Data collection
Clinical structured data included lung function (FEV1, FVC), blood oxygen saturation (SpO2), length of hospital stay, and disease duration. Lung function and SpO2 were recorded as percentages, hospital stay in days, and disease duration in years. Remote monitoring data were collected using certified wearable oximeters and activity trackers validated against hospital gold standards: pulse oximeters were cross-checked with Masimo Rad-97 monitors (mean absolute error 1.8% in the 90-100% SpO2 range), heart-rate sensors were validated against electrocardiography (mean error 2.3 bpm), and step counters were calibrated on a treadmill protocol. Raw data were exported as time-stamped CSV files at a 10-min sampling interval.
4. Sample size justification
Thresholds of 300 training samples for XGBoost and approximately 1000 non-overlapping 7-day sequences for LSTM were supported by experiments and power/simulation analyses. A post hoc power analysis using G*Power (version 3.1) indicated that 300 samples provided >80% power to detect a medium effect size (Cohen's f2 = 0.15) at α = 0.05 in logistic regression. Simulations showed that around 1000 sequences were necessary for stable convergence of the LSTM on multivariate physiological time series. The empirical evidence is summarized in Table 1 and visualized in Figure 3 and Figure 4.
5. Data preprocessing
Missing entries, identified as blanks, sentinel values, or NaN, were imputed using the training-set mean for each feature to avoid target leakage:
(1)
where mj is the number of observed values for feature j. The same
was applied to the validation and test sets. To remove scale-related bias, features were standardized with z-score normalization using training-only parameters:
(2)
where μj and σj are the mean and standard deviation of feature j estimated from the training data. For time-series signals (SpO2, heart rate, steps), streams were aligned to a 10-min cadence; short gaps up to 30 min were forward-filled, and longer gaps were smoothed with a three-point moving average. A 7-day sliding window with 1008 time steps was then applied to form non-overlapping sequences to prevent leakage (see Figure 2).
6. Model training
For structured clinical data, XGBoost was tuned via grid search over learning rate (0.01-0.3), maximum depth (3-10), and number of estimators (100-500) under a binary logistic objective (workflow in Figure 1). For remote monitoring data, the LSTM comprised two hidden LSTM layers with 128 units each, Xavier initialization, a dropout rate of 0.5, and a sigmoid output layer; optimization used Adam with a learning rate of 0.001 implemented in TensorFlow (pipeline in Figure 2). Overfitting was mitigated with dropout and early stopping (patience = 10), and class imbalance was addressed with SMOTE.
7. Evaluation strategy
Structured data were evaluated with stratified 10-fold cross-validation. Time-series data were evaluated with walk-forward validation to preserve temporal order. The metrics included accuracy, precision, recall, F-measure, area under the ROC curve (AUC), and mean squared error (MSE). Between-model differences were assessed using the Wilcoxon signed-rank test (two-sided). Figures include 95% confidence bands or error bars to quantify uncertainty. These choices directly address risks of time-series leakage and the need for statistical significance requested by the reviewers.
8. Clinical relevance and pilot testing
The hybrid model predicted SpO2 decline 6-12 h before clinical manifestation in 78% of monitored patients and reduced MSE by 42.5% relative to baselines. In a four-week pilot with 20 COPD patients, weekly model risk scores agreed with physician assessments in 85% of reviews, supporting the potential for clinical integration.
9. Software and environment
Analyses were performed in Python 3.10.6 with scikit-learn 1.2.2, XGBoost 1.7.5, TensorFlow 2.13, and PyTorch 1.13 on Ubuntu 20.04 LTS with an NVIDIA RTX 3080 GPU, CUDA 11.6, and cuDNN 8.2. Full versioning and vendors are listed in the unnumbered Table of Materials.