| Algorithm 1 | Frequency Domain Feature Matching Algorithm |
| Input: | Training dataset: ; length of training dataset:; Test dataset: ; length of test dataset:; Fast Fourier transform (FFT): ; The number of selected feature frequencies for each sample: ; The function that returns the index of the array sorted in ascending order: ; The function that reverses the array and returns the first elements:; The number of categories: ; The number of selected feature frequencies for each category: ; Scoring function with scoring rules 1, 2 and 3: ; A is feature frequencies; B is feature matrix. |
| Output: | Feature matrix with size of ; Scoreboard of all test samples. |
| Training stage: | Obtain feature matrix with size of |
|
for do (Obtain the frequency spectrums of training samples by FFT); ; (Extract feature frequencies from frequency spectrum of each training sample); end for for do ; for do if then Append to the end of the list ; end if end for Count the occurrence times of feature frequencies in and sort them in descending order; The feature sequence consists of the first feature frequencies; ; end for ; return |
|
| Test stage: | Calculate scoreboard of all test samples |
|
; for do (Obtain the frequency spectrums of test samples by FFT); ; (Extract feature frequencies from frequency spectrum of each test sample); (Initialize score); ; ; Append to the end of the list ; end for ; return |