March 10th, 2026
This study presents a standardized and reproducible protocol for implementing the Spatial-Temporal-Frequency EEG analysis tool (STFEEG) for motor imagery EEG decoding, incorporating configurable spatial-temporal-frequency segmentation, Common Spatial Patterns (CSP)-based feature extraction, multiple classification algorithms, and visualization capabilities.
This work develops a GUI-based toolbox for fun grid motor imagery EEG decoding and interpretable spatial-temporal-frequency analysis. Existing platforms lack integrated fun grid spatial, temporal, and frequency configuration with intuitive visualization for motor imagery EEG analysis. To begin, download STFEEG Tool from the online repository.
Unzip the downloaded file to a local folder and locate the installer file, STFEEG-Tool. mlappinstall, in the extracted contents. Double-click on STFEEG-Tool.
mlappinstall to launch the installer and follow the onscreen instructions to complete the installation. After downloading the example MAT-file, launch the STFEEG Tool graphical user interface to open the Motor Imagery EEG Analysis window. In the Data Loading panel, click on Browser next to Data Path and select the folder containing the prepared MAT-file.
Now, click on Browser next to Save Path and select an output folder for results. Click on Load in the Data Loading panel to import the MAT-file. In the Segmentation Strategy panel of the main graphical user interface, click on Edit to open the Segmentation configuration window where the default parameter settings are already provided.
To configure the temporal windows, select the Temporal Windows tab in the configuration window. Enter the start, end, and interval values to define temporal windows. Then click on Add to append the generated windows to the list.
To delete an existing window, right-click on the corresponding row in the table and select Delete. To configure filter bank frequency bands, select the Frequency Bands tab in the configuration window. Enter the start, end, and interval values to define frequency bands.
Then click on Add to append the generated bands to the list. To delete an existing frequency band, right-click on the corresponding row in the table and select Delete. To configure spatial segmentation by channel groups, select the Spatial Segmentation tab in the configuration window.
Click on Browser next to Channel Groups to select a channel group definition MAT-file. Click on Replace to load the selected channel group file and update the Groups of Channel Number list. If a channel location file has been selected in Channel Location, the tool also loads it for subsequent scalp visualizations.
Click on OK at the bottom of the Segmentation window to apply the updated temporal windows, frequency bands, and spatial segmentation. The Segmentation Strategy panel of the main graphical user interface is updated accordingly. In the Classification Configuration panel, select the Feature Extraction method from the dropdown menu.
Set nCSP to retain features from both ends of the feature vector. Then select the classifiers by checking the corresponding boxes. Set the Selection Bands Number to specify how many fine-grained segments or features are retained in wrapper-based selection.
Set Cross-Validation to specify the number of folds for k-fold cross-validation on train data and train label. Then click on Cross-Validation to perform k-fold cross-validation. Review the performance summary displayed in the Results panel.
Review the Time-Frequency Topographical Map to identify discriminative patterns across time, frequency, and scalp regions. Review the Electrode Group Significance Map to identify channel groups that contribute most to decoding. The Time-Frequency Topographical Map illustrated the spatial distribution of discriminative EEG patterns across frequency and temporal segments.
The Electrode Group Significance Map quantified the contribution of predefined electrode groups to decoding performance. This protocol both standardized decoding quantitative evaluation and visualization of subject-specific motor imagery EEG patterns. A key challenge is ensuring that pre-processing classification and multi-scale segmentation remain flexible and practicable across different datasets.
This workflow can spot interpretable analysis of subject-specific differences, and guide the development of more adaptive and generalizable MI-EEG decoding models.
View the full transcript and gain access to thousands of scientific videos
This article presents the STFEEG-Tool, a graphical user interface (GUI)-based toolbox designed for standardized, reproducible, and interpretable spatial-temporal-frequency analysis of motor imagery EEG (MI-EEG) data. The tool addresses the lack of integrated, user-friendly workflows for fine-grained MI-EEG feature extraction and decoding, supporting both research and practical neurorehabilitation applications.