## 5 Results and Discussion  
### Global Comparison  
In this section, a comprehensive comparison between SVM and KNN in different situations is conducted to achieve a basic understanding of their classification performance. The factors influencing classification accuracy for the KNN method considered in this paper are: the quantity of training data and the value of parameter \(K\). For the SVM method, we only consider the sample scale.  
Figures 10-13 show the global performance of the SVM and KNN methods for all categories. In Figure 10, the OA of KNN varies with the value of parameter \(K\) and the quantity of training data.  
The KNN method shows its potential to achieve a higher classification performance with the increase in training data quantity and a suitable parameter \(K\), as shown in the right corner of Figure 11. Figures 12 and 13 show a more detailed version of the comparison with the value of \(K\) from 11 to 21 and the quantity of training data from 180 to 300. It is also apparent that the region where KNN has better performance than SVM shows an expanding trend in Figure 13, and thus is likely to have superior performance if more training data was available.  
Figures 14 and 15 show the comparison between the two methods, in terms of PA and UA, for the four different GWCs. The accuracy values of KNN and SVM for weather classes B and C are similar, while there are significant differences when it comes to weather classes A and D.  
For class A, the highest PA values for the KNN and SVM are 84.92% and 85.08%, respectively. These two values are fairly close and so this is likely not a discriminating factor. However, the rising trends of UA are much more evident, especially for the KNN method. The UA of KNN in class A increases from 64.08% to 98.69% while the UA of SVM increases from 74.16 to 93.12% and nearly stops when the quantity of training data is more than 120. For class B and class C, the accuracy of KNN and SVM is identical. For class D, the performance of the KNN method is much better, the highest PA is 90.11% and the highest UA is 100%, while the most senior PA and UA of SVM are 84.79% and 93.12%. These differences are likely caused by the imbalance in the distribution of data in the four GWC categories. The total quantities of samples in class A and D are 24 and 19, and it is much less than the  
Figure 12: Detailed view of the accuracy of KNN and SVM method for high values of \(K\) and large amounts of training data.  
Figure 13: The better performing method in different parameter regions.  
quantities of samples in class B and C, which are 119 and 148. This makes the methods more sensitive to the training sample scale, especially for class A and D.  
Figure 14: The Product’s accuracy (PA) of KNN and SVM of four generalized weather classes. (**a**) PA values of GWC A; (**b**) PA values of GWC B; (**c**) PA values of GWC C; (**d**) PA values of GWC D.  
Figure 15: The User’s accuracy (UA) of KNN and SVM of four generalized weather classes. (**a**) UA values of GWC A; (**b**) UA values of GWC B; (**c**) UA values of GWC C; (**d**) UA values of GWC D.  
From the above analysis, we achieve a basic result that the KNN method has a higher potential in performance than the SVM method. When the quantity of training data is large enough, the KNN method will be able to achieve a better accuracy in the case of a proper number of nearest neighbors.