4.5. EEG Preprocessing and Feature Extraction

The following pipeline, as illustrated in Figure 7, ensures the EEG data is processed, and features are extracted, standardized and suitable for downstream classification tasks.

Figure 7: EEG Preprocessing and Feature Extraction Workflow

4.5.1. EEG Preprocessing

The EEG preprocessing workflow begins by loading raw EEG data from the DREAMER dataset for each participant and video across 14 channels. Using a Finite Impulse Response (FIR) filter, the data is filtered to isolate key frequency bands: theta (4-8 Hz), alpha (8-13 Hz), and beta (13-30 Hz), with the Hamming window applied to reduce artifacts. A zero-phase filter is then applied to eliminate phase shifts, ensuring that the temporal characteristics of the signals remain intact.

4.5.2. EEG Feature Extraction

Following preprocessing, Power Spectral Density (PSD) is computed for each frequency band using Welch's method, capturing the energy distribution within each band. For each band, the maximum PSD value is extracted to represent the dominant power, reducing feature dimensionality. These extracted features are organized into a DataFrame, which is then normalized and structured for further analysis.

Last updated