# A Soft-Voting Ensemble Classifier for Detecting Patients Affected by COVID-19
## 3 Results
### Performance Measures  
The performance of the build models has been analyzed according to different measures. In particular, the performance of the models has been assessed in terms of balanced accuracy, precision, specificity, sensitivity, F1-score, Area Under the ROC Curve (AUC), and Matthews Correlation Coefficient (MCC). In the following, the measures are briefly recalled for a binary classification problem and subsequently generalized for a multiclass problem. Let \(D\) be a dataset consisting of instances belonging to two classes, say positive and negative class. A binary classifier will assign a positive or negative label to each observation of \(D\). According to the classification outcome, the observations will fall into four categories:  
* True positives (_TP_)--instances belonging to the positive class that have been correctly predicted;
* False positives (_FP_)--instances belonging to the negative class that have been incorrectly predicted;
* True negatives (_TN_)--instances belonging to the negative class that have been correctly predicted;
* False negatives (_FN_)--instances belonging to the positive class that have been incorrectly predicted. Starting from the above definitions, the following performnce measures hold:
* Precision measures the fraction of positive instances correctly classified among all instances classified as positive: \[PREC=\frac{TP}{TP+FP}\] (3)
* Specificity refers to the true negative rate and is a measure of the ability of the classifier to predict the negative class: \[SPEC=\frac{TN}{TN+FP}\] (4)
* Sensitivity (or recall R) refers to the true positive rate and is a measure of the ability of the classifier to predict the positive class: \[SENS=\frac{TP}{TP+FN}\] (5)
* F1-score is the harmonic mean between precision and recall: \[F1=2\cdot\frac{P\cdot R}{P+R}\] (6)* Accuracy typically measures the ratio between correct predictions and the total number of observations. A different definition is adopted here, which consists of calculating the mean between specificity and sensitivity. This alternative measure (sometimes called balanced accuracy or unbiased accuracy) is more appropriate in the presence of imbalanced datasets (note that standard accuracy on imbalanced datasets may provide overoptimistic or overpessimistic estimations of the classifier ability to discriminate between classes. To contrast this \"bias\", one may define accuracy as the mean performed over specificity and ssensitivity, so that the the class imbalance is not taken into account). In symbols: \[ACC=\frac{SPEC+SENS}{2}\] (7)
* _AUC_ denotes the Area Under the Receiver Operating Characteristic curve (ROC curve for short). Being a plot of false positive rate (i.e., 1-specificity) against the true positive rate (i.e., sensitivity), it is used to assess the performance of a classifier varying the classification threshold. The AUC can provide relevant information while comparing different learning models. * Matthews Correlation Coefficient (_MCC_) provides a score that is very robust against class imbalance. Ranging from \(-1\) to +1, _MCC_ outputs a high score only when the classifier obtained good performance for both categories. In symbols: \[MCC=\frac{TP\cdot TN-FP\cdot FN}{\sqrt{(TP+FP)\cdot(TP+FN)\cdot(TN+FP)\cdot(TN+ FN)}}\] (8)  
Although the above performance measures are natively defined for binary problems, they can also be used to assess multiclass classifiers. A straightforward strategy to achieve this goal is to calculate the measures by adopting a One-vs-Rest (OvR) approach. The behavior of each class is first calculated against the remanining ones, and then, macro-averaging is enforced on these results. There are three main averaging methods, i.e., micro, macro and weighted averaging. The second was adopted to ensure that all classes are deemed equally important. This choice is reasonable as long as the minority class is not several orders of magnitude lower.