## 2 Materials and Methods
### Data Analysis  
To investigate whether air quality alerts from the SAR contributed to the improvement in IAQ, we conducted an analysis using real-time data collected from both indoor and outdoor air quality, alongside SAR alert information. Two analytical approaches were employed for this assessment.  
The first method involved examining the daily trend of air quality alert occurrences per hour. Each alert corresponded to a change in intervention stage, with alerts being more frequent during periods of poor air quality. We utilized two trendlines: one for 'good alerts', representing intervention Stages 1 and 2, and another for 'poor alerts', representing Stages 3 and 4. Therefore, with accumulated experience in receiving alerts via the SAR, it is reasonable to expect an improvement in air quality.  
For the second method, we employed machine learning forecasting analysis. Specifically, we utilized supervised learning, which leverages feature vectors and labels from training data to train and test models [44]. Among the four air quality variables, we focused on ultrafine dust, known to be particularly detrimental for COPD patients.  
Our primary outcome was a binary variable indicating the IAQ condition 30 min after the alert. The outcome was categorized as \"remained good\" or \"improved\" if the air quality either remained at Stage 1 or 2 or improved to those stages within 30 min of the alert. Conversely, it was categorized as \"remained poor\" or \"worsened\" if the air quality stayed at intervention Stages 3 or 4 or worsened to those stages within 30 min post-alert. Although we were unable to observe the specific efforts patients made to improve air quality after receiving alerts, an improvement in air quality from 'bad' to 'good' within 30 min suggests that the patient likely took appropriate measures. Previous studies have shown that air quality does not improve within 30 min of activities such as cleaning, cooking, or smoking indoors [45], and ultrafine particles generated during cooking can continue to concentrate for more than 5 h if ventilation is not implemented [46].  
Explanatory variables encompassed various factors including IAQ-related conditions, sociodemographic factors, COPD-related variables, and behavioral health outcomes. IAQ-related factors included the intervention level at the time of the alert, duration in weeks, and the time of the alert. Sociodemographic variables comprised years of education (0 = \(<\)9 years; 1 = \(>\)9 years), perceived self-rated health (1 = poor, 2 = normal, 3 = good), and the amount of time spent alone each day. COPD-related variables included scores from assessments such as the COPD Assessment Test (CAT) [47], modified Medical Research Council (mMRC) [48], Breathlessness, Cough, and Sputum Scale (BCSS) [49], and Test of the Adherence to Inhalers (TAI) [50]. Additionally, behavioral health outcomes were assessed using instruments such as the Patient Health Questionnaire (PHQ-9) [51] and European Quality of Life (EQ-5D) [52] scores. All explanatory variables were measured at both the baseline and the 8-week end point of the study period.  
We utilized the R 4.0.2 application for tasks such as machine learning, developing prediction models, association analysis, and model evaluation. We compared five commonly used supervised learning algorithms in machine learning: the naive Bayes classification model, the logistic regression model, the random forest model, the decision tree model, the  
Figure 4: COPD patient monitoring workflow.  
artificial neural network model, and the support vector machine model [53]. Additionally, we employed IBM SPSS 24.0 for analyzing the decision tree.