# A Soft-Voting Ensemble Classifier for Detecting Patients Affected by COVID-19
## 2 Materials and Methods
### The Proposed Approach
#### 2.4.2 Training  
Models have been built to be able to classify a 3D CT according to three possible classes (i.e., Normal, NCP and CP). For the aim of this work, Inception architectures adapted to analyze 3D inputs have been used. Due to the adopted testing strategy, i.e., 5-fold cross-validation, at each step, the dataset is automatically split into training (80%) and testing (20%). Each model has been trained with 2896 CT scans--note that 80% of 4023 scans amounts to 3218, but only 90% are used for training, whereas 10% are used for validation (see Table 3).  
Figure 5: The figure shows the slices of a chest scan. It can be observed that the information content of the scan tends to reduce moving toward its ends.  
Figure 6: The left side shows an original chest CT slice of size 512 \(\times\) 512. The right side shows the same chest CT slice after the pre-processing. The slice has been cropped in the center and then scaled to 256 \(\times\) 256 pixels.  
Given a scan, to fit the GPU memory, only a fixed number of the available slices (i.e., 25 and 35) has been used to represent each sample. In particular, the number of features (observed variables) relating to each scan amounts to 1,638,400 (i.e., 256 \(\times\) 256 \(\times\) 25) when taking 25 slices, whereas 2,293,760 (i.e., 256 \(\times\) 256 \(\times\) 35) features are required when taking 35 slices.  
It should be pointed out that working with an overwhelming number of features with respect to the available observations raises the well-known curse of dimensionality issue, which was first introduced by [PERSON] [27]. In particular, as the total amount of features increases, overfitting becomes more and more likely. To limit the overfitting, image augmentation has been enforced.  
Let us recall that image augmentation refers to techniques used to increase the amount of images in a dataset. Basically, it applies transformations (e.g., flipping, shifting, rotating) to existing images with the aim to create modified copies of them. In DL, image augmentation is applied with a twofold aim. In particular, it allows increasing the amount of data used to train a deep network with the aim of preventing overfitting. Moreover, the level of variation embedded with the new images allows building more robust models, enabling better generalizing on unseen images.  
Image augmentation can be implemented offline or online. In the former case, the transformations are applied before the learning process starts. In the latter case, augmentation is performed at each epoch, typically injecting some randomness in the procedures used for augmentation. As a consequence, whereas the offline approach generates a fixed set of augmented scans, the online approach generates augmented CT scans that in principle are different at each epoch.  
The online image augmentation approach has been used in this work. Basically, at each epoch, the CT scans have been modified by slightly rotating and shifting them. For each CT scan, the rotation and shift factors were randomly generated and applied to all slices.