A New Feature Analysis Approach to Selecting Channels of EEG for Fatigue Driving
Algorithm 3
Channel selection algorithm based on a single feature combined with ReliefF_SFS.
1: Parameter Setting and Feature Function Determination.
Set the parameters needed in the feature extraction process and the feature function of the SFS algorithm;
2: Feature Extraction.
Calculate the feature values of subjects in two driving states (resting state and fatigue state) in seconds and construct a feature matrix. For EEG signal data with a raw sampling frequency of 1000 Hz, the feature values are calculated with a division of 1 second to obtain the feature matrix , where represents the size of the rows of the matrix , i.e. the number of samples, and represents the number of electrodes, i.e. the number of channels;
3: Channel Weight Calculation.
Based on the feature matrix the ReliefF method is used to calculate the channel weights of the feature data to obtain the weight matrix ;
4: Channel Subset Selection.
Using the SFS method, the channel subset starts from the empty set, and the channel with the largest weight is selected to join the channel subset each time. The channel subset feature matrix is constructed iteratively, where (taking values from 1 to 30) represents the number of channels in each subset;
5: Divide the Training Set and the Test Set.
For each channel subset the feature matrix is randomly divided into two parts: the training set matrix and the test set matrix , where , i.e. and ;
6: Calculate the Recognition Accuracy.
The training data and the testing data are input into the KNN classifier, and the classification test is performed using five-fold cross-validation to obtain the recognition accuracy (i.e.: feature function value) matrix . Here, KNN is responsible for the verification of the channels selected by the SFS algorithm. If the recognition accuracy of the channel subset reaches the classification threshold, the channel subset will be viewed as the optimal channels. Or, the new channel subset is needed to be selected by the SFS algorithm. When the SFS algorithm is finished, the best combination of channels will be output.