4.3. Data Processing and System Design

4.3.1. High-Level Overview

This system architecture for stress classification, as illustrated in Figure 3, outlines the key stages involved in processing EEG and ECG data.

Figure 3: High-Level System Architecture for Stress Classification Using EEG and ECG Signals

The process begins with setup, configuration, and data loading, followed by initial preprocessing steps to extract relevant participant metadata and emotion labels. Subsequently, EEG and ECG signals undergo specialized processing, where features like heart rate variability (HRV), spectral densities, and wavelet coefficients are extracted. These features are then integrated into a unified dataset for feature engineering. Finally, the data is fed into a modeling and evaluation framework that includes model training, validation, and performance assessment to classify stress versus non-stress states.

4.3.2. System Design

This section describes the system architecture for classifying stress states using EEG and ECG data from the DREAMER dataset, covering data ingestion, signal preprocessing, feature engineering, and model training and evaluation steps, as shown in the following Figure 4.

Figure 4: System Architecture for EEG and ECG Signal Processing and Stress Classification

4.3.2.1. Data Ingestion

  • Load and parse data from the DREAMER dataset, including:

    • EEG and ECG recordings

    • Participants' self-reported emotional ratings

  • Organize data into a format compatible with feature extraction and machine learning

4.3.2.2. Preprocessing Pipeline

  • EEG Preprocessing:

    • Adjust group delays and remove artifacts

    • Filter frequencies to emphasize relevant signals

    • Apply transformations for better signal characteristics

  • ECG Preprocessing:

    • Detect QRS complexes

    • Extract heart rate variability (HRV) and other statistical features

  • Ensure standardized signals and extracted features, as shown in Figure X’s signal preprocessing blocks.

4.3.2.2. Model Pipeline

  • Split dataset into training and testing sets

  • Apply feature scaling or normalization as needed

  • Train classifiers (e.g., SVM, Random Forest) with cross-validation and hyperparameter tuning

  • Evaluate the model using metrics like accuracy to assess effectiveness in distinguishing stress from non-stress states

Last updated