# Skin Cancer Classification Using Fine-Tuned Transfer Learning of DENSENET-121
## 4 Results and Discussion
### Performance Indicators
Recall is defined as follows:  
\[Recall=\frac{TP}{TP+FN}, \tag{2}\]  
where \(FN\) is a false negative. A high F1-score indicates high precision and recall because the score contains information about these two variables. It is defined as follows:  
\[F1=\frac{2\times Precision\times Recall}{Precision+Recall} \tag{3}\]  
The ROC curve is a graphical representation of a model's ability to distinguish between different classes. It plots the True Positive Rate (Sensitivity) against the False Positive Rate (\(1-\) Specificity) at various threshold settings. A perfect model would reach the top-left corner, indicating a high True Positive Rate and a low False Positive Rate. \begin{table}
\begin{tabular}{l c c c c c c c} \hline \hline \multirow{2}{*}{**Models**} & \multirow{2}{*}{**Accuracy**} & \multicolumn{2}{c}{**P**} & \multicolumn{2}{c}{**R**} & \multicolumn{2}{c}{**F1**} \\  & & **Benign** & **Malignant** & **Benign** & **Malignant** & **Benign** & **Malignant** \\ \hline CNN & 82\% & 0.87 & 0.73 & 0.76 & 0.85 & 0.81 & 0.78 \\ SVM & 83\% & 0.88 & 0.78 & 0.83 & 0.83 & 0.85 & 0.81 \\ Random Forest Classifier & 81\% & 0.85 & 0.77 & 0.81 & 0.82 & 0.83 & 0.79 \\ Fine-tuned EfficientNetB0 & 84\% & 0.88 & 0.80 & 0.83 & 0.85 & 0.86 & 0.83 \\ Fine-tuned ResNet-34 & 82\% & 0.83 & 0.79 & 0.84 & 0.78 & 0.84 & 0.79 \\ Fine-tuned VGG16 & 85\% & 0.90 & 0.79 & 0.82 & 0.88 & 0.86 & 0.84 \\ Fine-tuned Inception_v3 & 81\% & 0.81 & 0.80 & 0.86 & 0.74 & 0.84 & 0.77 \\ Fine-tuned DenseNet-121 & 87\% & 0.87 & 0.87 & 0.90 & 0.82 & 0.88 & 0.84 \\ \hline \hline \end{tabular}
\end{table} 
Table 10: Model performance metrics. \[TPR=\frac{TP}{TP+FN} \tag{4}\]  
against  
\[FPR=\frac{FP}{FP+TN} \tag{5}\]  
where the following definitions are used:  
* **TPR:** True Positive Rate (Sensitivity or Recall). * **FPR:** False Positive Rate. * **TP:** True Positives. * **FP:** False Positives. * **TN:** True Negatives. * **FN:** False Negatives. AUC is the area under the ROC curve and provides a single metric to summarize the model's performance. The AUC value ranges from 0 to 1, where 1 indicates a perfect model, 0.5 suggests a model with no discriminative ability (equivalent to random guessing), and 0 indicates a completely wrong model. \[AUC=\int_{0}^{1}TPR(FPR)\,d(FPR) \tag{6}\]  
where the following definitions are used:  
* **TPR(FPR):** The True Positive Rate as a function of the False Positive Rate. * **d(FPR):** The infinitesimal change in the False Positive Rate. The Precision-Recall curve is a plot of Precision (Positive Predictive Value) against Recall (Sensitivity) for different threshold values. Precision measures the proportion of true positive predictions among all positive predictions, while Recall measures the proportion of true positives among all actual positives. This curve is especially useful when dealing with imbalanced datasets, where one class is much more common than the other. The confusion matrix as shown in Figures 4-11 are summarized as follows:  
Figure 4: CNN confusion matrix. Figure 5: Fine-tuned DenseNet-121 confusion matrix. Figure 6: Fine-tuned EfficientNetB0 confusion matrix. Figure 7: Fine-tuned ResNet-34 confusion matrix. Figure 8: Fine-tuned VGG-16 confusion matrix. Figure 10: SVM confusion matrix. \[TPR=\frac{TP}{TP+FN} \tag{4}\]0 Fine-tuned Inception v3 confusion matrix. CNN: Benign: 141/186 (76%), Malignant: 122/144 (85%) SVM: Benign: 152/186 (82%), Malignant: 123/144 (85%) Random Forest Classifier:Benign: 151/186 (81%), Malignant: 119/144 (83%) Fine-tuned VGG-16:Benign: 153/186 (82%), Malignant: 133/144 (92%) Fine-tuned ResNet-34: Benign: 159/186 (86%), Malignant: 101/144 (70%) Fine-tuned DenseNet-121: Benign: 163/186 (88%), Malignant: 122/144 (85%) Fine-tuned Inception-v3: Benign: 161/186 (87%), Malignant: 108/144 (75%) Fine-tuned EfficientNetB0: Benign: 155/186 (83%), Malignant: 123/144 (85%)  
The fine-tuned DenseNet-121 achieved the highest correct classification rate for benign lesions (88%) and performed well on malignant lesions (85%).