Clarification Needed on EEG Train/Test Split Methodology from Zheng & Lu (2015)

9 Ansichten (letzte 30 Tage)
Assem
Assem am 23 Jun. 2025
Beantwortet: Darshak am 25 Jun. 2025
I’m trying to replicate the train/test split method described in the paper: *"Investigating Critical Frequency Bands and Channels for EEG-Based Emotion Recognition with Deep Neural Networks" (Zheng & Lu, 2015) *.
The paper states:
*"We collected EEG data from 15 subjects, with each subject performing the experiment twice (two sessions) at one-week intervals. There are 30 experiments evaluated in total. The training data and test data come from different sessions of the same experiment. The training set contains nine sessions, while the test set contains six sessions from the same experiment."*
My Dataset Structure:
  • 15 subjects
  • Each subject has 3 sessions (not 2 as in the paper)
  • Each session contains 15 trials (EEG recordings) 45 trials per subject total
My Interpretation: Since the paper mentions 9 training sessions and 6 test sessions but each subject only has 2 sessions (in their case), I’m confused about how to apply this split.
Possible Approach (Need Validation):
  1. Per-Session Split (Within-Subject): For each session (15 trials), take the first 9 trials for training and the remaining 6 for testing. Repeat for all 3 sessions per subject. Average the accuracy across sessions for final subject-level performance.
OR
  1. Cross-Subject Session Pooling: Since the paper mentions 9 vs. 6 sessions, perhaps they pooled sessions from multiple subjects (e.g., 3 subjects × 3 sessions = 9 training sessions).
Key Questions:
  1. Does the 9 vs. 6 splits refer to sessions pooled across subjects, or is it a within-subject trial split?
  2. If within-subject, is my per-session (9 train / 6 test) approach, correct?
  3. If cross-subject, how should sessions be distributed to match their method?
Has anyone implemented this split before or understands how to align it with a dataset structured like mine? Any insights would be greatly appreciated!

Antworten (1)

Darshak
Darshak am 25 Jun. 2025
Hey @Assem,
This is a common situation when trying to adapt experimental setups from existing papers to a different dataset. The paper by Zheng & Lu (2015) talks about using 15 subjects, each with 2 sessions, and mentions that “the training set contains nine sessions, while the test set contains six sessions from the same experiment.” That part can be a bit confusing at first glance.
What they seem to be doing is splitting the data at the session level, not the trial level. So, it is not about picking 9 trials for training and 6 for testing from the same session — instead, full sessions are used as independent blocks. Each session contains multiple trials, but those trials stay together during splitting.
Now, if the dataset has 15 subjects with 3 sessions each, there is a bit more flexibility. A few ways to set up the train/test split that still follow the spirit of the paper:
  • Stick to session-level splits. Pick 9 full sessions (could be one session each from 9 subjects) for training, and 6 different sessions for testing. Rotate through the remaining sessions in cross-validation style.
  • Another option is to stay within subjects. For each subject, train on one session and test on another. With three sessions, all pairwise combinations can be used: (1→2), (1→3), (2→3), etc. Then average the results over all subjects.
Here is a rough example of how to organize the session-level splits in MATLAB:
sessionPairs = combvec(1:15, 1:3)'; % makes all (subject, session) pairs
perm = randperm(size(sessionPairs,1));
trainSessions = sessionPairs(perm(1:9), :);
testSessions = sessionPairs(perm(10:15), :);
And if the idea is to do it within each subject:
trainData = eegData{subj}.session{1};
testData = eegData{subj}.session{2};
Either of these keeps the training and testing data cleanly separated at the session level, which is important when working with EEG to avoid overfitting or data leakage.
Some useful MATLAB references that can help with this setup:

Kategorien

Mehr zu EEG/MEG/ECoG finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by