# Skin Cancer Classification Using Fine-Tuned Transfer Learning of DENSENET-121
## 4 Results and Discussion  
### Performance Indicators  
Our research, which involved both traditional machine learning and fine-tuned deep learning approaches, demonstrates that fine-tuning deep learning models can significantly enhance predictability and accuracy. The results reveal varied performance among different classifiers, reflecting their distinct strengths and weaknesses. As shown in Table 10. The CNN achieved an accuracy of 82%, while SVM reached 83%. These results indicate that traditional machine learning methods, while effective, often fall short compared with advanced deep learning techniques. The Random Forest Classifier recorded an accuracy of 81%, which is slightly lower, suggesting that its ensemble approach may not capture the complex patterns in skin cancer data as effectively as deep learning models as shown in Table 10. EfficientNetB0, a fine-tuned deep learning model, achieved an accuracy of 84% as shown in Table 10. This improvement over CNN and SVM highlights EfficientNetB0's capability to leverage efficient model architecture for better performance in complex classification tasks. ResNet34 also performed well with an accuracy of 82% as shown in Table 10, showing that while residual networks offer significant advantages, their performance can be highly dependent on specific tuning parameters and dataset \begin{table}
\begin{tabular}{l l l} \hline \hline
**Layer** & **Output Shape** & **Parameters Trained** \\ \hline EfficientNetB0 & (None, 7, 7, 1280) & 4,049,571 \\ Flatten & (None, 62,720) & 0 \\ Dense\_1 & (None, 32) & 2,007,072 \\ LeakyReLU\_1 & (None, 32) & 0 \\ Dense\_2 & (None, 16) & 528 \\ LeakyReLU\_2 & (None, 16) & 0 \\ Dense\_3 & (None, 1) & 17 \\ \hline
**Total Parameters** & & 6,057,188 \\
**Trainable Parameters** & & 2,007,617 \\
**Nontrainable Parameters** & & 4,049,571 \\ \hline \hline \end{tabular}
\end{table} 
Table 9: Parameters of fine-tuned EfficientNetB0. characteristics. VGG16 showed notable performance with an accuracy of 85% as shown in Table 10, demonstrating the efficacy of its deep network architecture in learning intricate features from the data. Inception_v3 and DenseNet121 achieved accuracies of 81% and 87%, respectively as shown in Table 10. DenseNet121's superior accuracy suggests that its dense connectivity pattern effectively facilitates feature reuse and gradient flow, leading to enhanced model performance. For all fine-tuned models, we introduced a flatten layer followed by three dense layers. The flatten layer transforms multidimensional feature maps into a one-dimensional vector, ensuring efficient data processing. The dense layers refine feature representation, capturing intricate patterns and relationships within the data. The use of LeakyReLU activation functions in the dense layers addresses the vanishing gradient problem and ensures stable training. Finally, the output dense layer with a sigmoid activation function simplifies binary classification, providing clear decision boundaries for healthcare professionals. The incorporation of these additional layers improves the efficiency and performance of the neural network models, leading to enhanced accuracy and reliability in skin cancer classification. The comparative performance of the classifiers underscores the importance of model architecture and tuning in achieving optimal results. Precision is a metric that evaluates the accuracy of predictions by measuring the proportion of correctly classified positive instances out of all predicted positive instances. It is computed by dividing the number of true positive predictions by the sum of true positive and false positive predictions. A high precision value indicates a well-performed model. Precision is defined as follows:  
\[Precision=\frac{TP}{TP+FP}, \tag{1}\]  
where \(TP\) is true positive and \(FP\) is false positive. Recall is the ratio of all positively classified classes with a positive outcome that is correctly predicted. A good model should have a high recall rate.