## 2 Materials and Methods
### Methods
#### Evaluation Metrics  
To evaluate the VGG16, VGG19 and MobileNetV2 models, a separate dataset was used for validation, which was not used during training. This ensured that performance metrics are calculated based on data that the models had not encountered before, providing a more accurate assessment of their capabilities. The models were tested on a significant number of validation images, and the predictions were compared with the actual classes to calculate the metrics.  
Accuracy was one of the metrics evaluated. This is one of the main metrics used to assess the performance of classification models. Accuracy was calculated as follows:  
\[Accuracy\;=\;\frac{\text{TP}\;+\;\text{TN}}{\text{TP}\;+\;\text{TN}\;+\;\text{ FP}\;+\;\text{FN}}, \tag{1}\]  
where  
* True Positive (TP): images showing ulcers that the model classifies as 'abnormal'.
* False Negative (FN): samples with ulcers that were incorrectly classified as 'normal', representing a missed diagnosis.
* False Positive (FP): samples without ulcers that were incorrectly classified as 'abnormal'.
* True Negative (TN): samples without ulcers that were correctly classified.  
A second metric calculated was precision. Precision is a crucial metric when evaluating classification models, especially in medical contexts where the weight of false positives can be significant. This measures the proportion of TPs out of all instances the model classified as positive, indicating how reliable its positive predictions are. It was calculated as follows:  
\[Precision\;=\;\frac{\text{TP}}{\text{TP}\;+\;\text{FP}}, \tag{2}\]  
Another metric calculated was recall, also known as sensitivity or hit rate, that measures the model's ability to correctly identify TPs. In simple terms, recall measures how many of the actual positive instances were correctly identified by the model. The following equation is used to calculate it:  
\[Recall\;=\;\frac{\text{TP}}{\text{TP}\;+\;\text{FN}}, \tag{3}\]  
The last metric evaluated was F1-Score. This is a widely used metric in machine learning, especially in scenarios where there is an imbalance between classes or where both precision and recall are important. The F1-score is the harmonic mean between precision and recall, combining these two metrics into a single score that reflects the balance between the accuracy of positive predictions and the model's ability to correctly identify positive instances:  
\[F1_{Score}=\;2\;\times\;\frac{Recall\;\times\;Precision}{Recall\;+\;Precision}, \tag{4}\]  
In addition to the traditional metrics, the confusion matrices of each model were calculated. The confusion matrix is an essential tool for evaluating classification models, especially in supervised learning problems such as the detection of diabetic foot ulcers. This matrix allows the model's performance to be clearly visualised by providing a comparison between predicted and actual values. In binary classifications, such as this work, the matrix is made up of four main elements:  
\[\text{TP}=\text{Recall}\times\text{Total Number of Positives}, \tag{5}\]  
\[\text{FN}=\text{Total Number of Positives}, \tag{6}\]  
\[\text{FP}=\frac{\text{TP}}{Precision}-\text{TP}, \tag{7}\]