Research Article
EEG-Based Automatic Sleep Staging Using Ontology and Weighting Feature Analysis
Algorithm 1
Finding the best threshold value.
Input:pbest = 0, ACbest = 0, Sfemale = , Smale = ; % Initialize the optimal threshold value, the highest accuracy rate, the best subset of features. | (1) | for p = [0.0005: 0.0005:1] | (2) | S1, S2; % Two sets of feature subsets for different genders were produced based on correlation analysis. | (3) | S1, classifier; % S1 and S2 were forwarded to the RF classifier to classify five-state sleep stages. | (4) | AC; %The classification accuracy obtained by RF. | (5) | if ACbest ≤ AC | (6) | ACbest = AC, pbest = p, Sfemale= S1, Smale = S2; | (7) | end | (8) | end | Output:pbest, Sfemale, Smale; |
|