Skip to content

Latest commit

 

History

35 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Universal BCI Hypnosis Depth Classification (通用EEG催眠深度分类系统)

Proxy-Labeled Cross-Dataset EEG State Classification: Multi-Source Domain Generalization with Limited Target-Domain Calibration
This repository explores cross-dataset alignment of heterogeneous EEG recordings under coarse proxy labels; it does not claim to measure validated clinical hypnosis depth.

Python 3.8+ License: MIT Version v6.5


Overview

This repository implements a complete pipeline for cross-dataset three-level EEG state classification inspired by hypnosis-depth research. The system unifies 8 public EEG datasets into a common 63-dimensional feature space, trains multi-source domain generalization models, and evaluates limited target-domain subject calibration with sample concatenation for domain adaptation. All hypnosis-depth labels are proxies: the two OpenNeuro datasets contain real hypnosis recordings but only provide task-condition or session-level annotations, not continuous depth scores.

Version History

Version Date Key Changes
v6.5 2026-06-19 Full 52-subject ds004572 processing (190,929 windows); Mahalanobis WFSC benchmark (exp103); EEGNet-v4 baseline (exp104); SHAP feature importance (analyze_shap_rf); all results integrated into paper_final.md and README.md
v6.4 2026-06-18 Subject-level split IDs repaired for MAHNOB/SEED/SEED_IV; ds006437 reprocessed with event-phase-aware labels; ds004572 labels fixed to task-condition; single reproducible runner run_exp101_reproducible.py; all 8 datasets in standard pipeline
v6.3 2026-06-07 138/160 20-seed experiments complete (legacy run), all P0 fixes claimed, paper updated
v6.2 2026-06-07 MAHNOB real-subject grouping from session.xml, 5-seed preliminary results
v5.2 2026-06-03 Single-pass verification, ds006437 label leak patched, MAHNOB real arousal labels recovered
v5.0 2026-06-02 8-dataset multi-source LODO with MAHNOB real labels
v2.1 2026-05-14 63-dim locked features, LODO/LOSO/LOO, bootstrap CI

Key Features

  • 63-dimensional feature space: 14 channels × 3 bands Log-Bandpower + 7 asymmetry pairs × 3 bands DASM
  • 8 datasets unified (712,832 total windows, 697,906 valid labeled windows):
    • 5 emotion proxy: DREAMER, DEAP, MAHNOB-HCI, SEED, SEED-IV
    • 1 affective video: FACED
    • 2 real hypnosis recordings with proxy depth labels: ds004572 (task-condition), ds006437 (event-phase-aware)
  • Real MAHNOB self-assessment labels: 1-9 feltArsl extracted from session.xml metadata (527 sessions, 27 real subjects, 100% window coverage)
  • Subject-level split guaranteed: MAHNOB/SEED/SEED_IV now use real participant IDs, eliminating trial/session leakage in calibration/test splits
  • Multi-Source LODO: Leave-One-Domain-Out — 7 source domains train, 1 target domain evaluates
  • Limited target-domain calibration: 20% target-domain subjects added to training set for domain adaptation
  • Event-phase-aware ds006437 labels: A/F→Awake, I/P→Light, S/D/C/L/R/N/B→Deep from EEGLAB event markers (replaces session-aware split)
  • Single reproducible runner: run_exp101_reproducible.py generates multi_8ds.json from scratch with fixed parameters
  • Per-class recall + confusion matrix: every experiment record includes class-level diagnostics

Final Experimental Results (v6.5 — finalized)

Status: The v6.5 P0 and P2 fixes (real subject-level splits, event-phase-aware ds006437, task-condition ds004572, full 52-subject ds004572, Mahalanobis WFSC benchmark, EEGNet-v4 baseline, SHAP analysis) have been applied and all headline numbers were regenerated by the reproducible runners. The table below reports the latest multi_8ds.json (160/160 experiments) with event-phase-aware ds006437 labels and full 52-subject ds004572.

Target Domain Zero-Shot Acc Calib Acc (20%) Δ ZS F1 Label Source Seeds
DEAP 66.02% ± 3.79 65.65% ± 7.03 -0.36pp 0.577 SAM Arousal (1-9) 20
DREAMER 50.86% ± 0.90 50.89% ± 1.78 +0.03pp 0.227 ScoreArousal (1-5) [class-0 fixed] 20
FACED 33.33% ± 0.00 33.33% ± 0.00 +0.00pp 0.167 Subject-group proxy 20
MAHNOB 37.33% ± 0.83 37.31% ± 0.74 -0.01pp 0.195 feltArsl (1-9) real 20
SEED 33.82% ± 0.39 33.82% ± 0.39 +0.00pp 0.168 Trial-structure proxy 20
SEED_IV 25.36% ± 0.20 25.36% ± 0.20 +0.00pp 0.135 ReadMe emotion→arousal 20
ds004572 44.42% ± 0.29 44.89% ± 0.21 +0.46pp 0.224 Task-condition proxy 20
ds006437 29.05% ± 4.30 60.18% ± 4.83 +31.13pp 0.220 Event-phase-aware proxy 20
Overall 40.02% ± 12.61 43.93% ± 13.53 +3.91pp 160

Reproducible Runner Output

python run_exp101_reproducible.py

Mahalanobis vs. Fixed-Weight WFSC (exp103)

A 5-seed benchmark comparing calibration-aware Mahalanobis weighting against fixed sample-concatenation weighting:

Target Mahal Acc (%) Fixed Acc (%) Mahal BAcc Fixed BAcc Δ BAcc
DEAP 56.28 ± 9.20 58.29 ± 7.59 0.4115 ± 0.1125 0.4294 ± 0.1228 -0.0179
DREAMER 49.92 ± 0.57 50.15 ± 0.69 0.3367 ± 0.0062 0.3386 ± 0.0089 -0.0019
FACED 33.54 ± 1.32 33.54 ± 1.32 0.3333 ± 0.0000 0.3333 ± 0.0000 +0.0000
MAHNOB 36.10 ± 0.64 36.12 ± 0.66 0.3391 ± 0.0034 0.3403 ± 0.0036 -0.0012
SEED 33.56 ± 0.00 33.56 ± 0.00 0.3333 ± 0.0000 0.3333 ± 0.0000 +0.0000
SEED_IV 25.01 ± 0.00 25.01 ± 0.00 0.3333 ± 0.0000 0.3333 ± 0.0000 +0.0000
ds004572 44.73 ± 0.31 44.77 ± 0.31 0.3422 ± 0.0066 0.3438 ± 0.0069 -0.0016
ds006437 72.88 ± 4.64 72.84 ± 4.51 0.4328 ± 0.0269 0.4321 ± 0.0260 +0.0007

No systematic improvement from Mahalanobis weighting; most targets remain at chance-level balanced accuracy.

EEGNet-v4 Baseline (exp104)

End-to-end EEGNet-v4 trained on raw 2-second windows under the same LODO/calibration splits (5 seeds, 4,000 source windows per domain):

Target Acc (%) BAcc (%) macro-F1 (%) weighted-F1 (%) Cohen's κ
DEAP 69.98 ± 6.14 35.86 ± 3.76 31.79 ± 7.24 59.49 ± 9.64 0.084 ± 0.126
DREAMER 49.49 ± 3.68 33.86 ± 0.70 25.38 ± 4.15 37.16 ± 5.52 0.014 ± 0.019
FACED 33.74 ± 1.15 33.33 ± 0.00 16.81 ± 0.43 17.03 ± 1.02 0.000 ± 0.000
MAHNOB 39.36 ± 1.23 33.33 ± 0.00 18.83 ± 0.42 22.24 ± 1.20 0.000 ± 0.000
SEED 32.59 ± 0.00 33.33 ± 0.00 16.39 ± 0.00 16.02 ± 0.00 0.000 ± 0.000
SEED_IV 25.00 ± 0.02 33.33 ± 0.00 13.33 ± 0.01 10.00 ± 0.01 0.000 ± 0.000
ds004572 44.79 ± 0.01 33.33 ± 0.00 20.62 ± 0.00 27.71 ± 0.01 0.000 ± 0.000
ds006437 73.05 ± 0.81 33.33 ± 0.00 28.14 ± 0.18 61.68 ± 1.08 0.000 ± 0.000

The EEGNet results mirror the RF baseline: DEAP and DREAMER are the only targets with balanced accuracy above chance. ds006437 reaches 73% accuracy but with BAcc ≈ 33.3% and κ ≈ 0, indicating majority-class prediction. The remaining targets collapse to majority-class prediction.

SHAP Feature Importance (analyze_shap_rf)

TreeSHAP rankings of the 63 RF features per dataset:

Dataset Top-1 Feature Top-2 Feature Top-3 Feature
DEAP AF3_Alpha (0.0105) AF3_Theta (0.0092) AF3_Beta (0.0060)
DREAMER AF3_Beta (0.0057) AF3_Theta (0.0054) AF3_Alpha (0.0052)
FACED ⚠️ AF3_Beta (0.0000) AF3_Alpha (0.0000) AF3_Theta (0.0000)
MAHNOB AF3_Theta (0.0014) AF3_Beta (0.0010) AF3_Alpha (0.0009)
SEED ⚠️ AF3_Beta (0.0000) AF3_Alpha (0.0000) AF3_Theta (0.0000)
SEED_IV ⚠️ AF3_Beta (0.0000) AF3_Alpha (0.0000) AF3_Theta (0.0000)
ds004572 AF3_Theta (0.0033) AF3_Beta (0.0028) AF3_Alpha (0.0017)
ds006437 AF3_Alpha (0.0077) AF3_Theta (0.0074) AF3_Beta (0.0050)

AF3 theta/alpha/beta bandpower dominates the non-degenerate datasets. SEED, SEED_IV, and FACED have zero SHAP values because the RF predicts a single class for all windows.

Fixed parameters:

  • MAX_SRC = 8000 (per source domain)
  • MAX_TGT = 8000 (per target domain)
  • n_estimators = 200
  • min_samples_leaf = 5
  • class_weight = 'balanced'
  • 20 seeds
  • Output: results/exp101_lodo_loso/multi_8ds.json and multi_8ds_master.json

Key Findings (v6.5 pipeline fixes)

  1. Subject-level split integrity restored: MAHNOB (527 sessions → 27 subjects), SEED (360 file-trial IDs → 10 subjects), SEED_IV (1,080 file-trial IDs → 15 subjects) now use real participant IDs for LOSO calibration/test splits, eliminating subject leakage.
  2. ds006437 re-labeled with event-phase awareness: A/F→Awake, I/P→Light, S/D/C/L/R/N/B→Deep from EEGLAB .set event markers, replacing the session-aware split which mixed induction and deep phases within a session.
  3. ds004572 labels aligned to task-condition: baseline→Awake, induction→Light, experience→Deep, matching prep01 trial IDs.
  4. Single reproducible runner: run_exp101_reproducible.py is the only script needed to regenerate multi_8ds.json from the preprocessed data.
  5. DREAMER class-0 present: ScoreArousal mapping yields all three classes (awake/light/deep).
  6. Per-class diagnostics: every result record includes confusion matrix and per-class recall to expose label collapse.
  7. Label collapse mitigation (v2): SMOTE oversampling for RF (run_exp101_v2_mitigation.py) and focal loss (γ=2.0) for EEGNet (run_exp104_v2_focal.py) implemented; FACED exclusion analysis available; results in results/exp101_v2_mitigation/ and results/exp104_v2_focal/.

ds006437 Label Note

The ds006437 LIGHT dataset does not provide validated per-session hypnotic depth scores. Current labels are event-phase-aware proxies derived from button-press markers in EEGLAB .set files:

  • A_pressed / F_pressed (Ascend Stairs / Finish) → Awake (0)
  • I_pressed / P_pressed (Induction / Safe haven) → Light (1)
  • S/D/C/L/R/N/B_pressed (deepening phases) → Deep (2)

Real per-session depth scores would require expert clinical re-annotation of the raw physiological recordings, which is outside the computational scope of this study. See §5.7 of paper_final.md for details.

FACED Exclusion Analysis

FACED's artificial class balance (34,440/34,440/34,440) suggests its labels were manually balanced. Excluding FACED from target evaluation (filtering existing 20-seed results) raises overall accuracy from 40.02% to 40.98% (ZS) and 43.93% to 45.44% (Calib). The run_exp101_v2_mitigation.py script supports a --mode exclude_faced option for full re-evaluation without FACED. 7. All 8 datasets in standard pipeline: split_manager.ALL_DATASETS and prep03.LABEL_LOADERS now include ds004572.


Directory Structure

universal_bci_hypnosis/
├── paper_final.md                       # Final complete paper (v6.5)
├── config.yaml                          # Global configuration (v6.5)
├── requirements.txt                     # Python dependencies
├── README.md                            # This file
│
├── run_exp101_reproducible.py           # SINGLE reproducible runner for multi_8ds.json
├── run_exp101_v2_mitigation.py          # v2 mitigation: FACED exclusion + SMOTE oversampling
├── run_exp104_v2_focal.py               # v2 EEGNet with focal loss for label collapse
├── repair_subject_ids.py                # Repair MAHNOB/SEED/SEED_IV subject IDs in processed files
├── reprocess_ds006437_event_labels.py    # Reprocess ds006437 with event-phase-aware labels
├── reprocess_ds004572.py                 # Reprocess ds004572 features and task-condition labels
├── run_exp104_eegnet_reproducible.py     # Reproducible EEGNet-v4 baseline
├── analyze_shap_rf.py                    # SHAP feature importance for RF classifiers
├── fix_mahnob_labels.py                 # MAHNOB real arousal label recovery from session.xml
├── process_ds004572_full.py             # ds004572 lazy-loading 1000→128Hz processor (optional 52 subjects)
│
├── shared/                              # Shared utility modules
│   ├── config_loader.py                 # Config validation & directory creation
│   ├── seed_manager.py                  # Central random seed management
│   ├── logger.py                        # Unified logging (console + file)
│   ├── split_manager.py                 # LODO/LOSO/LOO split management
│   ├── feature_extraction.py            # 63-dim feature extraction (14ch mapping, BP, DASM)
│   ├── label_mapping.py                 # Dataset-specific → 3-class label mapping
│   ├── domain_adaptation.py             # CORAL, TCA, AdaBN implementations
│   ├── mahalanobis_wfsc.py              # Mahalanobis dynamic-weight WFSC (LedoitWolf) — not used by main runner
│   ├── wfsc.py                          # Fixed-weight WFSC variant
│   └── metrics.py                       # Metrics & statistical tests
│
├── scripts/                             # Preprocessing pipeline (prep01–prep04)
│   ├── prep01_build_63feat_all_datasets.py  # Load raw EEG, 14ch mapping, windowing
│   ├── prep02_make_3class_hypnosis_labels.py # 63-dim feature extraction
│   ├── prep03_generate_splits_lodo_loso.py   # 3-class label generation & alignment
│   └── prep04_generate_splits_lodo_loso.py   # Train/calib/test split generation
│
├── realtime/                            # Real-time EPOC+ BCI scripts (Paper 2, planned)
├── data/                                # Raw EEG datasets (not in git)
├── processed/                           # Preprocessed features & labels
├── splits/                              # LODO/LOSO splits (generated by prep04)
├── results/                             # Experiment results
│   ├── exp101_lodo_loso/                # Main LODO results (multi_8ds.json)
│   ├── exp101_v2_mitigation/            # v2 mitigation: FACED exclusion + SMOTE
│   ├── exp103_mahal_vs_fixed/           # Mahalanobis WFSC benchmark
│   ├── exp104_eegnet/                   # EEGNet-v4 baseline
│   ├── exp104_v2_focal/                 # EEGNet with focal loss
│   └── shap_rf/                         # SHAP feature importance
├── models/                              # Saved models
└── logs/                                # Log files

Environment Setup

# Clone
git clone https://github.com/korose523/BCI_Full_Length.git
cd BCI_Full_Length

# Create virtual environment
python -m venv venv
venv\Scripts\activate  # Windows

# Install dependencies
pip install -r requirements.txt

# For EEGNet baseline:
pip install torch torchvision

Python ≥ 3.8 required. Core dependencies: NumPy, SciPy, scikit-learn, MNE-Python, PyYAML, h5py, pandas, tqdm.


Dataset Setup

All 8 datasets are in the project data/ folder (total ~62 GB). Paths are configured in config.yaml.

# Dataset Data Path Size Label Source Type
1 DREAMER data/DREAMER/DREAMER.mat 0.5 GB ScoreArousal (1-5) Emotion proxy
2 DEAP data/DEAP/data_preprocessed_python/ 3.3 GB SAM Arousal (1-9) Emotion proxy
3 MAHNOB-HCI data/MAHNOB/Sessions/ 3.8 GB feltArsl (1-9) real Emotion proxy
4 SEED data/SEED/ExtractedFeatures_1s/ 1.9 GB Trial-structure proxy Emotion proxy
5 SEED-IV data/SEED_IV/eeg_feature_smooth/ 0.3 GB ReadMe emotion→arousal Emotion proxy
6 FACED data/FACED/EEG_Features/ 0.3 GB Subject-group proxy Affective video
7 ds004572 data/ds004572/ (BIDS) 47.3 GB Task-condition proxy Real hypnosis recording
8 ds006437 data/ds006437/ (BIDS) 4.7 GB Event-phase-aware proxy [FIXED] Real hypnosis recording

Dataset sources: DREAMER (IEEE DataPort), DEAP (QMUL), MAHNOB-HCI (mahnob-db.eu), SEED/SEED-IV (BCMI Cloud), FACED (GitHub), ds004572/ds006437 (OpenNeuro).

MAHNOB self-assessment: Real 1-9 feltArsl labels recovered from data/MAHNOB/Sessions/*/session.xml (see fix_mahnob_labels.py). Also saved as data/MAHNOB/mahnob_self_assessment.json.


Run Order

Stage 1: Preprocessing

# Step 1: Load raw EEG, map to 14 EPOC+ channels, sliding windows
python scripts/prep01_build_63feat_all_datasets.py

# Step 2: Extract 63-dimensional features per window
python scripts/prep02_make_3class_hypnosis_labels.py

# Step 3: Generate 3-class hypnosis proxy labels (Awake/Light/Deep) & align to windows
python scripts/prep03_generate_splits_lodo_loso.py

# Step 4: Generate subject-aware calibration/test splits
python scripts/prep04_generate_splits_lodo_loso.py

Stage 2: Label Fixes (run before experiments)

# Recover MAHNOB real self-assessment arousal labels from session.xml
python fix_mahnob_labels.py

# Reprocess ds006437 with event-phase-aware labels (replaces deprecated position-based and session-aware fixes)
python reprocess_ds006437_event_labels.py

# Reprocess ds004572 features and task-condition labels
python reprocess_ds004572.py

Stage 3: Experiments

# Multi-source LODO (subsampled, ~6-8 min per target, 8 targets x 20 seeds = ~1.5-2h total):
python run_exp101_reproducible.py

Stage 4: ds004572 Full Processing (optional, 52 subjects)

# Lazy-loading 1000→128Hz for all 52 subjects (~4-5h):
NUMBA_DISABLE_JIT=1 python process_ds004572_full.py

Feature Description

63-Dimensional Feature Vector

Range Dimensions Description
[0:42] 42 14 channels × 3 bands Log-Bandpower (Theta 4-8Hz, Alpha 8-13Hz, Beta 13-30Hz)
[42:63] 21 7 asymmetry pairs × 3 bands DASM

Pipeline

  1. Channel mapping: Nearest-neighbor on 10-20 coordinates → 14 EPOC+ channels
  2. Resampling: Integer-ratio polyphase → 128 Hz
  3. Sliding window: 256 samples (2s), step 128 (1s), 50% overlap
  4. Log-Bandpower: Welch PSD → log10(trapz(PSD) + 1e-10) per band
  5. DASM: logBP(left) - logBP(right) for 7 symmetric pairs
  6. Normalization: Subject-level z-score per feature dimension

14 EPOC+ Channels

AF3  F7   F3   FC5  T7   P7   O1
AF4  F8   F4   FC6  T8   P8   O2

7 Asymmetry Pairs

AF3-AF4, F7-F8, F3-F4, FC5-FC6, T7-T8, P7-P8, O1-O2 (all left-minus-right)


Label Transparency

3-Class Mapping

Class Label Description
0 Awake (清醒) Normal waking consciousness / high arousal
1 Light Hypnosis (浅催眠) Relaxation, transition state
2 Deep Hypnosis (深催眠) Profound relaxation, altered perception / low arousal

Per-Dataset Label Details

Dataset Original Scale 3-Class Boundaries Type
DREAMER ScoreArousal (1-5) ≤2=Deep, 3=Light, ≥4=Awake Proxy
DEAP SAM Arousal (1-9) ≤3=Deep, 4-6=Light, ≥7=Awake Proxy
MAHNOB feltArsl (1-9) real ≤3=Deep, 4-6=Light, ≥7=Awake Real self-report
SEED de_movingAve trial structure Trial-group based Proxy
SEED-IV ReadMe emotion labels (0-3) {2,3}→Awake, 0→Light, 1→Deep Proxy (ReadMe-derived)
FACED PSD/DE features Subject-group based Proxy
ds004572 Task condition Baseline→Awake, Induction→Light, Experience→Deep Task-condition proxy
ds006437 EEGLAB event markers A/F→Awake, I/P→Light, S/D/C/L/R/N/B→Deep [FIXED] event-phase-aware proxy

⚠️ Important: Only MAHNOB uses real continuous self-assessment labels (1-9 scale). All other datasets use proxy or task-condition mappings. ds004572 and ds006437 are real hypnosis recordings, but their labels are task-condition or event-phase-aware proxies rather than validated continuous depth scores (0-10). Label types are clearly marked in all outputs.


Evaluation Protocol

Multi-Source LODO (Leave-One-Domain-Out)

  • 8-fold: each dataset as target, remaining 7 merged as source
  • No target labels used during zero-shot training
  • 20% target-domain subjects reserved for FS²C calibration

FS²C (Few-Shot Subject Calibration)

  • Calibration samples concatenated with source data before final RF training
  • Simple sample concatenation (not Mahalanobis-weighted — see shared/mahalanobis_wfsc.py for advanced variant)

Statistical Reliability

  • 20 seeds (42, 123, 456, 789, 2024, 1111, 2222, 3333, 4444, 5555, 6666, 7777, 8888, 9999, 1234, 2345, 3456, 4567, 5678, 6789) for the finalized v6.5 run
  • Single reproducible runner: python run_exp101_reproducible.py
  • Wilcoxon signed-rank test on paired seeds included in multi_8ds.json

Known Limitations (Honest Disclosure)

  1. ds004572 resolved: All 52 subjects processed (190,929 windows) and included in v6.5 results
  2. Mahalanobis WFSC benchmarked: No improvement over fixed-weight; see results/exp103_mahal_vs_fixed/
  3. EEGNet-v4 benchmarked: Results mirror RF collapse; see results/exp104_eegnet/
  4. SHAP analyzed: AF3 spectral features dominate; SEED/SEED_IV/FACED produce zero SHAP values due to single-class collapse
  5. ds006437 approximation: Event-phase-aware labels use hypnotherapy button-press event markers; real per-session hypnosis depth scores are not available in the BIDS structure
  6. Proxy labels: DREAMER, SEED, SEED-IV, FACED, ds006437, and ds004572 use proxy/task-condition/session labels — not validated clinical hypnosis depth annotations
  7. Simplified calibration: Current calibration uses sample concatenation; Mahalanobis dynamic-weighting shows no gain in this feature space

Data Integrity

All numbers in this README and in paper_final.md are generated directly from the preprocessed EEG data by reproducible scripts. No data were fabricated, manually altered, or selectively omitted. Key verifiable artifacts:

  • results/exp101_lodo_loso/multi_8ds.json — 160 records (8 targets × 20 seeds)
  • results/exp103_mahal_vs_fixed/exp103_results.json — 8 targets × 5 seeds, Mahalanobis vs. fixed-weight
  • results/exp104_eegnet/exp104_results.json — 8 targets × 5 seeds, EEGNet-v4; rebuilt from checkpoint to ensure all targets are present
  • results/shap_rf/shap_summary.json — top-20 SHAP features per dataset
  • processed/prep01_windows/ds004572_windows.npz — 190,929 windows × 52 subjects
  • processed/prep02_features/ds004572_features.npz — 190,929 × 63 features
  • processed/prep03_labels/ds004572_labels.npz — 190,929 labels with matching subject IDs

Degenerate results (e.g., single-class collapse on SEED/SEED_IV/FACED and majority-class EEGNet accuracy on ds006437) are reported transparently rather than hidden.


FAQ

Q: Why 14 channels instead of 32/64?

The EMOTIV EPOC+ consumer headset has exactly 14 channels. Mapping all datasets to this layout ensures direct deployability on consumer BCI hardware (Paper 2).

Q: Why Random Forest instead of deep learning?

In cross-dataset zero-shot scenarios, the domain gap (different devices, electrode layouts, sampling rates) severely degrades deep model performance. Hand-crafted spectral features with explicit physical meaning transfer more robustly.

Q: How are proxy labels justified?

No large-scale, multi-subject, real-hypnosis EEG dataset exists with standardized numeric depth annotations. We leverage the relationship between arousal and hypnotic depth (Theta enhancement, Beta suppression) to approximate hypnosis-like states. All proxy labels are clearly marked.

Q: What about the Mahalanobis WFSC?

A 5-seed benchmark (scripts/exp103_wfsc_dynamic_mahalanobis_vs_fixedw.py) found no systematic improvement over fixed-weight sample concatenation; see results/exp103_mahal_vs_fixed/exp103_results.json and Table 4 in paper_final.md.


Citation

@article{bci_hypnosis_2026,
  title={Multi-Source Domain Generalization with Few-Shot Calibration for Cross-Dataset EEG Hypnosis Depth Classification},
  author={},
  journal={},
  year={2026},
  note={v6.5, P2 baselines integrated}
}

License

MIT License. Individual datasets are subject to their respective licenses and terms of use.

About

使用脑电判断紧张或放松的算法和验证

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages