# Machine-Learning-Based COVID-19 and Dyspnoea Prediction Systems for the Emergency Department
## 2 Materials and Methods
### Data Collection  
Fondazione IRCCS Policlinico San Matteo's Emergency Department of Pavia established a strict protocol during triage operations to diagnose patients who might have potentially been infected by SARS-CoV-2. The procedure was mandatory to stratify patients and avoid cross-contamination during hospital operations. To apply ML methodologies and aid physicians during the pandemic, we mainly looked at clinical characteristics available in any ED triage, such as history taking, symptoms, and vital signs. Furthermore, we gathered information that is not only associated with patients' respiratory malfunctions, but also satisfies the constraint of being promptly available and cheap, such as routine blood tests, arterial blood gas examination (ABG), and lung ultrasound quantitative evaluation [2; 27; 29]. We collected data from patients complaining about potential SARS-CoV-2 symptoms, whom the physicians swabed to diagnose the disease. The collection process lasted from March 1 to 30 June 2020. In the end, we acquired the list of features shown in Figure 2 for 1355 patients, where we report the correlation coefficient between each feature and the outcome to be predicted, namely both COVID-19 positivity assessment and oxygen therapy potential need. Several studies reported the presence of typical SARS-CoV-2 pneumonia patterns during LUS examination. We collected quantitative information regarding lung injuries due to their usefulness in the diagnosis and the prognosis of patients affected by COVID-19 [2; 27; 29; 30; 31; 32; 33]. LUS presents advantages compared to other tools: a fast, non-ionizing, radiation-free, cheap, and bedside technique. Not only can we perform an ultrasound for unstable patients, but also it is easily repeatable. Therefore, we extensively exploited a strict acquisition protocol [34] and assigned a standardized LUS Score to get a quantitative analysis of patients' lung health conditions. Hence, we studied each lung in six different areas with a high-frequency linear probe (5 MHz) and scored each of the lung portions [34]. Furthermore, we defined the modified LUS score as the sum of the scores assigned to each lung's region, thus ranging from 0, namely when the lung is well aerated, to 36, describing a lung in which all the regions present a tissue-like consolidated pattern. Hence, as reported in Figure 2, we included the 12 scores associated with each lung's region, ranging from 0 to 3, and the overall modified LUS score. Figure 2 reports that quantitative lung evaluation positively correlates with the estimation targets. Figure 1: Summary of the machine learning approach: the data analysis workflow. We performed data cleaning and pre-processing operations, comprising categorical features transformation into dummy variables, namely the conversion of textual features into discrete and numerical values and the handling of missing values. Values could have been missing due to a variety of reasons. The first reason is machinery malfunctioning: the device performing the test needed might not have written certain information well. Secondly, the physicians' workload and pace. If a subject was visibly affected by SARS-CoV-2, and there was not enough time to assist other patients according to the highest healthcare standards and complete the data acquisition protocol, the personnel interrupted the process to respect the hard time constraints demanded by the pandemic. Unfortunately, there is no quick way to fix missing values. Hence, we adjusted the dataset to 443 patients by excluding all the patients whose values were missing. In conclusion, we split 90% of the data into the training set and the remaining 10% into the test set. Experts usually suggest these percentages to be 70% and 30% [35]. However, because our dataset size was insufficient to keep relevant information in the training set at the end of the data-cleaning process, we decided to opt for this kind of subdivision. Moreover, to meet reliable results free from overfitting problems, we performed a 10-fold cross validation.