Research Article
Effect Improved for High-Dimensional and Unbalanced Data Anomaly Detection Model Based on KNN-SMOTE-LSTM
Algorithm 1
The SMOTE algorithm steps.
| Input:T for training sample, N for oversampling rate, K for k-nearest neighbor parameter, and n for the number of the small-sized sample () | | Output:S for new training sample | | Step 1: calculate the k-nearest neighbors of of minority samples () (Euclidean distance is adopted in this paper) | | Step 2: randomly select a sample from the k-nearest neighbors. | | Step 3: generate a random number ζ between 0 and 1 for synthesis of a new sample | | . | | Step 4: repeat the step 2 and step 3 according to the oversampling rate N | | Step 5: obtain new training sample S | | Step 6: the new training sample S was classified with a classifier | | Step 7: output classification results |
|