## 4 RFF Extraction and Identification Methods
### Random Forest and Sequential Detection-Based RFF Identification Method  
After the radio frequency fingerprint feature vectors of the devices are extracted according to the above method, the next step is to use these features to distinguish and identify different devices. In this paper, the random forest algorithm which has better effect in the machine learning methods is selected and combined with the sequential detection method to effectively distinguish devices of the same model and to better adapt to the diverse environment through long-term observation and tracking of the trend of RFF features. The random forest algorithm is an ensemble learning algorithm that uses multiple decision trees to train samples and make judgments and the judgment results are obtained by the combination of multiple decision trees randomly generated in the forest [31]. Based on the bagging idea, through randomly selecting samples for training, and then randomly selecting the characteristics of different dimensions of the samples to become the branch and establish a decision tree, the correlation between different decision trees is reduced and the accuracy of the model is further improved. After multiple iterations, the trees will adaptively select better samples and characteristics for branching each time, making themselves perform more outstanding in the forest. The idea of an \"out-of-bag estimate\" is taken advantage of, in which a part of the samples in the training set is used for learning, where the selected samples will be put back into the training set for the next extraction, and the remaining part of the samples is used for predicting. In the random forest algorithm, the importance of each dimension of the feature in the tree is measured by changing the weight of the feature in the tree and comparing the change of the error rate of the test data before and after the change. The concrete steps to classify radio frequency fingerprint features using random forest algorithm are as follows:Set the size of the training set as \(N\), the tree number in the forest as \(n_{tree}\), the number of iterations as \(K\). For each tree, \(K\) groups of training sample sets with the size of \(N\) need to be randomly selected. 2. Assuming that characteristic dimension of the sample is \(n\), specify a constant \(m<<n\), and randomly select \(m\) dimensions from the \(n\)-dimension vector for each training set above. 3. In the process of generating \(K\) groups of training set, the optimal characteristics are selected in each round of iteration. Then, the \(m\)-dimension characteristics are used to maximize the growth of each tree to obtain the model for each decision tree and the whole forest. 4. Among the \(K\) classification models, the optimal random forest model is selected by using the idea of \"out-of-bag estimation\". For the input test set data, the final classification result is given by synthesizing the decision results of each tree in the forest. The correlation between sub-sample sets and the correlation between characteristics of sub-sample sets is random, which ensures that the decision tree does not need pruning and will not cause overfitting. In addition, using multiple trees for decision making can also avoid overfitting caused by noise that may be generated by a single decision tree. Experiments also demonstrate that the random forest algorithm has a high classification accuracy for radio frequency fingerprint features, which will be introduced in the next section. On the basis of statistical learning, this paper applies the idea of sequential detection to RFF identification. Sequential detection can comprehensively make a decision based on the current real-time signal features and the characteristics observed in the previous period of time. This method can reduce the impact of instantaneous feature mutation on RFF recognition and can update and correct the features in the fingerprint database in real time, thereby improving the recognition accuracy of the devices in long-term work.