# Automatic Classification of Foot Thermograms Using Machine Learning Techniques
## 3 Results and Discussion
### Classification with Model 2  
In this subsection, the results of Model 2 are presented. This model is proposed in order to improve the performance of the classification of the healthy and diabetic classes; a very important step as it contributes to the division of the classification between healthy and diabetic thermograms.  
In Model 2, the classification is divided in two stages: initially a binary classification is performed, in order to catalog the foot thermogram as belonging to a healthy or a diabetic individual; for the feet classified as diabetic, a second classifier is used to obtain a refinement of the classification.  
The evaluation of the classification algorithms is measured considering as a true positive when the model correctly predicts the diabetic individual and as a true negative when the model correctly predicts the healthy individual. The performances of the different algorithms are shown in Table 4.  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Algorithm** & **Accuracy** & **Sensitivity** & **Specificity** & **Precision** & **AUC** & **F-Score** \\ \hline SVM Linear & 0.858 & 0.898 & 0.750 & 0.907 & 0.902 & 0.903 \\ SVM Quadratic & 0.858 & 0.888 & 0.778 & 0.916 & 0.908 & 0.902 \\
3-NN & 0.787 & 0.832 & 0.667 & 0.872 & 0.872 & 0.851 \\ Weighted k-NN & 0.825 & 0.867 & 0.708 & 0.890 & 0.920 & 0.879 \\ LR & 0.892 & 0.923 & 0.806 & 0.928 & 0.954 & 0.926 \\ \hline \hline \end{tabular}
\end{table}
Table 4: Metrics scores for stage 1 in Model 2—binary classification.  
Figure 5: ROC Curves for Model 1, with SVM Quadratic algorithm.  
It can be seen that LR is the algorithm with the highest values in the different metrics, obtaining differences greater than 10% compared to the algorithm 3-NN, which has the worst results, while the SVM algorithms are the second-best ones, with similar results, followed by Weighted k-NN; however, this was higher than the 3-NN algorithm. In Figure 6, the ROC curves for all of the five algorithms are illustrated.  
In the second stage of Model 2, a multi-classification, similar to the one in Model 1, is applied. As the aim of this stage is to refine the diabetic classification, only thermograms of diabetic individuals are used and the same three classes used in Model 1 are considered.  
The evaluation of each classification algorithm is measured, separately, for each one of the three classes, using a one-vs.-all method. The results of performance obtained for each class with the different algorithms are shown in Table 5. The comparison of the algorithms is based on the average values, of the three classes, for each of the metrics; these values are shown in the _Average_ row of Table 5.  
Figure 6: ROC Curves for stage 1 in Model 2 for the different algorithms: binary classification.  
From Figure 7 it is perceptible that, although all the AUC results are higher than 91%, Class 1 is the one whose performance excels, with the highest AUC value. Classes 2 and 3 present very similar AUC values, but considering the values of other metrics, the results in Class 3 are slightly better than in Class 2.