## 3 Study Evaluation
### Classification Performance  
To evaluate the performance of the proposed models, three different metrics are computed: these metrics are the specificity, the sensitivity, and the F-Measure.  
The _sensitivity_ of a test is the proportion of people who test positive among all those who actually have the disease, and it is defined as:  
\[Sensitivity=\frac{tp}{tp+fn}\]  
where _tp_ indicates the number of true positives and _fn_ indicates the number of false negatives.  
The _specificity_ of a test is the proportion of people who test negative among all those who actually do not have the disease, and it is defined as:  
\[Specificity=\frac{tn}{tn+fp}\]  
where _tn_ indicates the number of true negatives and _fp_ is related to the number of false positives.  
The _F-Measure_ represents the weighted average between the specificity and the sensitivity metrics:  
\[F\text{-}Measure=2*\frac{Specificity*Sensitivity}{Specificity+Sensitivity}\]  
Table 1 contains the results of the classification of the _lung disease detection_ model. In parentheses, we indicate the performance on the training model.  
As emerges from the results depicted in Table 1, the proposed method reaches a specificity score between 0.965 and 0.979 and a sensitivity score between 0.997 and 1. For the lung disease detection task, the model that achieves the most interesting performance is the one built with the _neural network_.  
With regard to the _lung disease characterisation_ model, the results are shown in Table 2. In parentheses, we indicate the performance on the training model.  
In this case, the average ranges from 0.883 (with the _kNN_ model) to 0.917 (with the _neural network_ model), while the sensitivity, on average, ranges from 0.907 (with the _SVM_  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Model** & _F-Measure_ & _Specificity_ & _Sensitivity_ \\ \hline _kNN_ & 0.981 (0.993) & 0.965 (0.988) & 0.997 (0.999) \\ _SVM_ & 0.983 (0.994) & 0.966 (0.990) & 1.000 (1.000) \\ _Neural Network_ & 0.983 (0.991) & 0.979 (0.988) & 0.988 (0.995) \\ _Logistic Regression_ & 0.979 (0.988) & 0.976 (0.986) & 0.982 (0.992) \\ \hline \hline \end{tabular}
\end{table}
Table 1: Lung disease detection classification results.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Model** & _F-Measure_ & _Specificity_ & _Sensitivity_ \\ \hline _kNN_ & 0.892 (0.932) & 0.883 (0.927) & 0.908 (0.939) \\ _SVM_ & 0.872 (0.936) & 0.890 (0.931) & 0.907 (0.938) \\ _Neural Network_ & 0.923 (0.948) & 0.917 (0.941) & 0.931 (0.958) \\ _Logistic Regression_ & 0.892 (0.916) & 0.886 (0.906) & 0.904 (0.929) \\ \hline \hline \end{tabular}
\end{table}
Table 2: Lung disease characterisation results.  
classification algorithm) to 0.931 (with the _neural network_ classification algorithm). The algorithm obtaining the best performance is the _neural network_.  
From the classification results, it emerges that for, both the models (i.e., lung disease detection and characterisation), the algorithm obtaining the best performance is the _neural network_.  
In Table 3, we show the confusion matrix for the lung disease characterisation for the _neural network_ model, the one obtaining the best performance.  
From the confusion matrix results shown in the table, we computed, for each disease, the metrics shown in Table 4. From this analysis, it emerges that the proposed method achieves interesting performance in disease detection.