Algorithm 2: Hybrid learning classifier algorithm for classification of sleep stages. |
Inputs: Training feature matrix (), training class label (), test feature matrix (), number of nearest neighbors (nn), desired sparsity level ().
Output: Predicted class label,
Step 1: The training feature matrix is taken as a dictionary for the sparse representation of the test feature vector. The rth test instance can be written as [35]. where is the feature matrix for eth class. are the class-specific sparse representation vectors.
Step 2: In this step, the combined sparse representation vector is evaluated using the orthogonal matching pursuit (OMP) method as the optimization problem based on the fact that the minimization of -norm subjected to is NP-hard [45].
Step 3: The residual for the eth class is computed as [35].
Step 4: In this step, the distances between and all training instances for the eth class are computed and these distances are given as . Then, the nearest distances for each class are selected. The median value of these distances for each class are evaluated, and they are given by , where nn is the number of nearest neighbors for each class.
Step 5: The residual and distance for each class are summed up and the total distance (TD) is computed. The total distance for the eth class is given by [35].
Step 6: The distance vector is evaluated as . The predicted class label for each feature vector in the test feature matrix is computed as [35]. For all test instances, the predicted class label vector is given as .
|