# Multi-Time and Multi-Band CSP Motor Imagery EEG Feature Classification Algorithm
###### Abstract  
The effective decoding of motor imagination EEG signals depends on significant temporal, spatial, and frequency features. For example, the motor imagination of the single limbs is embodied in the \(\mu\) (8-13 Hz) rhythm and \(\beta\) (13-30 Hz) rhythm in frequency features. However, the significant temporal features are not necessarily manifested in the whole motor imagination process. This paper proposes a Multi-Time and Frequency band Common Space Pattern (MTF-CSP)-based feature extraction and EEG decoding method. The MTF-CSP learns effective motor imagination features from a weak Electroencephalogram (EEG), extracts the most effective time and frequency features, and identifies the motor imagination patterns. Specifically, multiple sliding window signals are cropped from the original signals. The multi-frequency band Common Space Pattern (CSP) features extracted from each sliding window signal are fed into multiple Support Vector Machine (SVM) classifiers with the same parameters. The Effective Duration (ED) algorithm and the Average Score (AS) algorithm are proposed to identify the recognition results of multiple time windows. The proposed method is trained and evaluated on the EEG data of nine subjects in the 2008 BCI-2a competition dataset, including a train dataset and a test dataset collected in other sessions. As a result, the average cross-session recognition accuracy of 78.7% was obtained on nine subjects, with a sliding window length of 1 s, a step length of 0.4 s, and the six windows. Experimental results showed the proposed MTF-CSP outperforming the compared machine learning and CSP-based methods using the original signals or other features such as time-frequency picture features in terms of accuracy. Further, it is shown that the performance of the AS algorithm is significantly better than that of the Max Voting algorithm adopted in other studies. electroencephalogram decoding; motor imagery; common space pattern; sliding window +
Footnote †: 2021: 11, 10294. [[https://doi.org/10.3390/app112110294](https://doi.org/10.3390/app112110294)]([https://doi.org/10.3390/app112110294](https://doi.org/10.3390/app112110294))  
(KNN) [13], Support Vector Machines (SVM) [14], Kernel Naive Bayes [15], and so on. Machine learning methods have been used to extract distinctive biomarker features and to identify healthy people and stroke patients in [16; 17; 18]. Reference [19] proposed a Hybrid Machine Learning (HML) Classifier (including KNN, SVM, RF, NB, LR, CART, LDA, AB, GB, and ET) to perform bruxism detection. Ref. [20] generalized a fixed classification method for all subjects by combining the XDAWN spatial filter and the Riemannian Geometry Classifier (RGC) for P300-EEG signal decoding. In [21], the Common Spatial Patterns (CSP) and Linear Discriminant Analysis (LDA) machine learning algorithms were applied to EEG signals for feature extraction and classification, respectively. Motor imagery (MI) EEG decoding aims to correctly analyze brain signal patterns (left and right hand, etc. ), providing a basis for the implementation of an online BCI. In the MI experimental paradigm, selecting an effective period from a complete MI trial is a critical step. In most MI experimental paradigms, a complete 3-5 s-long trial is used as the smallest unit. However, on the one hand, the subject's attention and imagination ability is not necessarily a continued focus in the whole trial process. On the other hand, different subjects have different reaction times after receiving instructions. Therefore, it is a key problem to crop the most profitable MI period before decoding the data. Selecting adequate time windows and taking advantage of their characteristics can maximize the temporal features of MI-EEG signals. In addition to temporal features, EEG also includes frequency features and spatial features.