## 4 Experimental Results and Analysis
### Experimental Results  
In this section, the comprehensive performance comparison of the proposed SkinSwinViT model is carried out and compared with other CNN methods in terms of accuracy measures. The study evaluated the performance of various models, such as AlexNet, VGG-11, GoogleNet, ResNet50, ViT, SwinViT, and our SkinSwinViT model. Table 3 illustrates that the proposed SkinSwinViT model exhibits superior performance on the dataset, achieving an accuracy of 0.9788, representing a 3.4% improvement over the second-best model, SwinViT, which attained an accuracy of 0.9444. This notable enhancement underscores the efficacy of SkinSwinViT in the classification of skin diseases, evidencing its aptitude in such tasks. Moreover, SkinSwinViT attains the highest recall rate at 0.9775, surpassing SwinViT's rate of 0.9391, indicative of its superior ability to identify positive samples and heightened sensitivity in disease detection. Notably, SkinSwinViT demonstrates commendable precision, specificity, and F1 score, registering values of 0.9783, 0.9936, and 0.9779, respectively. The elevated precision, specificity, and F1 score affirm the model's proficiency in accurately discerning positive samples within skin disease classification, reflecting a well-balanced performance. Despite a marginal increase in parameter count compared to ResNet50 and SwinViT, SkinSwinViT exhibits exceptional performance and notable generalization capabilities, effectively mitigating this numerical  
discrepancy. Its remarkable adeptness in image comprehension and feature extraction is complemented by commendable generalizability. With a parameter size of 31 million, SkinSwinViT emerges as a lightweight model with considerable efficacy. From Figure 5, it is apparent that with an increasing number of iterations, the model's accuracy on the training set exhibits a gradual ascent followed by stabilization, concurrently with a gradual decline and stabilization in the loss function. This trend indicates an augmentation in the model's learning capacity, leading to improved fitting to the training data. However, an exclusive focus on the model's performance solely on the training set may precipitate overfitting issues. Overfitting delineates a scenario wherein a model performs well on the training set but performs poorly when presented with unseen data due to its excessive complexity or propensity to glean excessive information from noise and intricacies within the training set, consequently resulting in diminished generalization performance. Figure 6 delineates a discernible trend wherein, with an increasing number of iterations, the model's accuracy on the testing set exhibits a gradual augmentation followed by stabilization concurrently with a gradual reduction and stabilization in the loss function. This observation signifies a progressive enhancement in the model's predictive prowess and generalization capabilities concerning unfamiliar data during the testing process. Additionally, comparative analysis of various metrics on the testing set reveals improved performance in contrast to the training set, thereby indicating the model's superior performance on the testing set while mitigating overfitting. Notably, as the testing loss diminishes, the model's alignment with the testing data augments. Furthermore, with the model's improvement, the testing loss demonstrates a decline, underscoring the model's heightened generalization performance. Figure 5: Comparison of train Accuracy and Loss results of multiple models in the training set. (**a**) Comparison of train Accuracy results of multiple models; (**b**) Comparison of train Loss results of multiple models.