## 2 Operation Principle of Proposed KNN Based Scheme  
The KNN algorithm [23] was first proposed by [PERSON], which is commonly employed for text categorization, a process of identifying the class to which a text document belongs. The KNN algorithm is considered a simple and intuitive algorithm: comparing the features of a testing data set with a training data set and finding the k instances closest to the instance in the training dataset under a given training dataset, for the new input testing instances. Moreover, the category corresponding to testing data is the one with the largest number of occurrences in k instances. The operation procedure of the KNN algorithm is described as follows:  
Firstly, the input dataset is written as:  
\[T=\{(x_{1},\ y_{1}),\ (x_{2},\ y_{2}),\ \ldots,\ (x_{N},\ y_{N})\},\ i=1,\ 2,\ \ldots,\ N \tag{1}\]  
where \(x_{i}\in\chi\subseteq R^{n}\) denotes the feature vector of the instance; \(y_{i}\in Y=\{c_{1},\ c_{2},\ \ldots,\ c_{k}\}\) is the category of the instance. The distance L between input training data and testing data is calculated as Equation (2):  
\[\text{L}\Big{(}x_{i},\ x_{j}\Big{)}=\left(\sum\
olimits_{l=1}^{2}\left|x_{i} ^{l}-x_{j}^{l}\right|^{2}\right)^{\frac{1}{2}}=\sqrt{\left|x_{i}{}^{(1)}-x_{ j}{}^{(1)}\right|^{2}+\left|x_{i}{}^{(2)}-x_{j}{}^{(2)}\right|^{2}} \tag{2}\]  
where \(i\) and \(j\) denote the instance of training data and testing data, \(l\) denotes the dimension. Subsequently, the distance is sorted according to the rising relation of distance. Next, following the given distance measurement, the k nearest points to \(x\) are found in the training set T before determining the occurrence frequency of the categories of the preceding \(k\) points. And the neighborhoods of \(x\) covering the \(k\) points are expressed as \(N_{k}(x)\), which is used in Equation (3). Finally, the category with the highest frequency in the preceding \(k\) points is returned as the prediction classification of testing data. The majority voting strategy is selected as the decision criteria:  
\[\text{y}= \begin{array}{c}\underset{c_{j}}{\text{arg}max}\\ c_{j}\end{array} \sum\
olimits_{x_{i}\in N_{k}(x)}I\Big{(}y_{i}=c_{j}\Big{)},\ i=1,\ 2,\ \ldots,\ N;j=1,\ 2,\ \ldots,\ K \tag{3}\]  
where \(I\) denotes the indicator function. When \(y_{i}=c_{j}\), \(I\) is 1, otherwise 0. As shown in Figure 1, the green dot represents the test data, blue squares represent category A of the training set, and red triangles represent category B of the training set. If the value of \(k\) is set to 3, the number of red triangles will be 2 greater than the blue squares, of which there is 1. Thus, the category of green dot is red triangle. However, when the value of \(k\) increases to 5, the category of green dot belongs to blue square since the number of blue squares is greater than the red triangles. The special case of the k-nearest neighbor algorithm is \(k=1\), which is named as the nearest neighbor algorithm. Figure 1: The k-nearest neighbor (KNN) schematic diagram. There are two situations dealing with the complex data. One is the training stage in which modulation format of training data is known, and the other is the testing stage, which is the unknown data waiting for identification with the KNN classifier obtained in the training stage. For the training data, the KNN algorithm is utilized to process the feature vector to build a model which is virtually the KNN classifier. For the unknown data, the feature vector is fed into the KNN classifier, and the modulation format of this data can be obtained. It is worth mentioning that KNN does not have an explicit learning process. In fact, it is a well-known representative of lazy learning. This kind of learning technology only saves samples at the training stage. After receiving the test sample, the subsequent processing is carried out, including comparing the test data with the stored data.