| Algorithm 2. Signal modulation classification algorithm based on improved stacking. | |
|
Define: (1) The dataset consists of a training set T and a validation set V with sample sizes t and v respectively; (2) The features proposed in Section 2.1 are defined as base-features F with the dimension f, and the class labels of the signal samples are taken as the expected outputs; (3) The number of folds for cross-validation is denoted as K, and the corresponding initialization index k is set to 1. The number of base-learner types is denoted as N, and the corresponding initialization index n is set to 1. | |
| Input: Base-features | |
| Output: Modulation type of signal | |
| Training Phase | |
| Training of base-learners: | |
| 1 | Divide the training set T into K parts equally; the k-th part serves as the validation set Tak for the base-learner, containing samples; the remaining k−1 parts serve as the training set Tbk for the base-learner, containing samples |
| 2 | while (k < K) do |
| 3 | while (n < N) do |
| 4 | Initialize base-learner |
| 5 |
|
| 6 |
|
| 7 | end while |
| 8 |
|
| 9 |
|
| 10 | end while |
| 11 | // Concatenate along the sample axis to obtain the meta-feature set P, which is based on training set T |
| 12 | Save all pre-trained base-learners |
| Training of meta-learner: | |
| 13 | Initialize the meta-learner |
| 14 | // Take the meta-feature set P as the input of meta-learner, take the labels of training set T, i.e., ground truth, as the target output for meta-learner, and then obtain pre-trained meta-learner by training |
| 15 | Save the pre-trained meta-learner |
| Validation Phase | |
| 1 | Load all pre-trained base-learner and pre-trained meta-learner |
| 2 | while (n < N) do |
| 3 | while (k < K) do |
| 4 |
|
| 5 | end while |
| 6 |
|
| 7 | end while |
| 8 | Meta-feature enhancement: // Concatenate and along the feature axis to obtain enhanced meta-feature |
| 9 | // Input into pre-trained meta-learner M to obtain prediction R |
| 10 | // Evaluate the prediction performance of R by comparing with the target output of the validation set V using relevant metrics |
| 11 | Return the prediction R and evaluation results E |