## 4 Experimental Results and Analysis
### SkinSwinViT Performance Analysis  
This section presents the performance analysis of the proposed SkinSwinViT model on the considered dataset. Recognizing that accuracy alone does not provide a comprehensive assessment of a model's performance, a confusion matrix was generated to elucidate the model's performance across multiple classes. Figure 7 presents the confusion matrix comparing SkinSwinViT and SwinViT. It highlights SkinSwinViT's precise performance across the majority of categories, effectively classifying a substantial portion of the samples. Remarkably, the integration of the global attention module significantly enhances classification accuracy while mitigating misclassification. This module facilitates the model in discerning and optimizing pivotal features, \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Model** & **Accuracy** & **Recall** & **Precision** & **Specificity** & **F1 Score** \\ \hline AlexNet & 0.9095 & 0.9072 & 0.9018 & 0.9330 & 0.9036 \\ GoogLeNet & 0.9540 & 0.9540 & 0.9543 & 0.9738 & 0.9541 \\ VGG-11 & 0.9354 & 0.9331 & 0.9295 & 0.9596 & 0.9307 \\ ResNet50 & 0.9456 & 0.9418 & 0.9430 & 0.9634 & 0.9421 \\ ViT & 0.8156 & 0.8027 & 0.8021 & 0.8513 & 0.7998 \\ SwinViT & 0.9751 & 0.9752 & 0.9738 & 0.9846 & 0.9744 \\ Our SkinSwinViT & 0.9906 & 0.9906 & 0.9916 & 0.9995 & 0.9910 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Comparison between testing set SkinSwinViT and other models. Figure 6: Comparison of test Accuracy and Loss results of multiple models in the testing set: (**a**) Comparison of test Accuracy results of multiple models; (**b**) Comparison of test Loss results of multiple models. thereby improving differentiation between categories. Despite occasional misclassifications observed in the NV, MEL, and BKL classes, possibly attributable to class similarity or inherent noise within the samples, the overall high performance of SkinSwinViT remains evident. Table 5 highlights the notable performance of the SkinSwinViT model, particularly evident in the DF category, where it demonstrates exceptionally high accuracy. Furthermore, the SkinSwinViT model consistently surpasses the SwinViT model across all individual categories, underscoring its enhanced classification capabilities. Specifically, it exhibits superior accuracy in distinguishing NV, MEL, BKL, and other sample types. Figure 8 presents the ROC curve of SkinSwinViT and SwinViT. A comparison between the two models reveals significant improvements in the AUC values across the majority of categories. This noteworthy finding substantiates the efficacy of integrating global attention into the model, leading to enhanced classification performance within each category. The remarkable achievements of the SkinSwinViT model in the multiclass classification of skin diseases bear substantial importance in aiding the diagnosis and classification of such conditions. \begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline \multirow{2}{*}{**Model**} & \multirow{2}{*}{**Metrics**} & \multirow{2}{*}{**NV**} & **MEL** & **BKL** & **BCC** & **AKIEC** & **VASC** & **DF** \\ \hline \multirow{8}{*}{SwinViT} & Accuracy & 0.9078 & 0.9189 & 0.8951 & 0.9556 & 0.9108 & 0.9793 & 0.9909 \\  & Recall & 0.9078 & 0.9188 & 0.8950 & 0.9553 & 0.9105 & 0.9798 & 0.9909 \\  & Precision & 0.9078 & 0.9315 & 0.9122 & 0.9405 & 0.9133 & 0.9758 & 0.9869 \\  & Specificity & 0.9628 & 0.9649 & 0.9637 & 0.9616 & 0.9633 & 0.9761 & 0.9783 \\  & F1 Score & 0.9078 & 0.9251 & 0.9035 & 0.9478 & 0.9119 & 0.9776 & 0.9889 \\ \hline \multirow{8}{*}{SkinSwinViT} & Accuracy & 0.9672 & 0.9726 & 0.9544 & 0.9847 & 0.9688 & 0.9918 & 0.9952 \\  & Recall & 0.9673 & 0.9728 & 0.9543 & 0.9840 & 0.9686 & 0.9913 & 0.9952 \\ \cline{1-1}  & Precision & 0.9697 & 0.9724 & 0.9646 & 0.9798 & 0.9686 & 0.9907 & 0.9952 \\ \cline{1-1}  & Specificity & 0.9939 & 0.9949 & 0.9973 & 0.9971 & 0.9941 & 0.9985 & 0.9991 \\ \cline{1-1}  & F1 Score & 0.9684 & 0.9725 & 0.9595 & 0.9823 & 0.9686 & 0.9913 & 0.9952 \\ \hline \hline \end{tabular}
\end{table}