Skip to content

Eeg gcnn contribution#929

Draft
jburhan wants to merge 7 commits intosunlabuiuc:masterfrom
jburhan:eeg-gcnn-contribution
Draft

Eeg gcnn contribution#929
jburhan wants to merge 7 commits intosunlabuiuc:masterfrom
jburhan:eeg-gcnn-contribution

Conversation

@jburhan
Copy link
Copy Markdown

@jburhan jburhan commented Apr 1, 2026

No description provided.

Your Name and others added 3 commits March 31, 2026 17:40
Implements the EEG-GCNN paper (Wagh & Varatharajah, ML4H @ NeurIPS 2020)
as a PyHealth 2.0 contribution with dataset, task, tests, docs, and
ablation study script.

New files:
- pyhealth/datasets/eeg_gcnn.py — EEGGCNNDataset (TUAB normal + MPI LEMON)
- pyhealth/datasets/configs/eeg_gcnn.yaml — YAML config
- pyhealth/tasks/eeg_gcnn_nd_detection.py — EEGGCNNDiseaseDetection task
  (PSD features, spatial/functional/combined adjacency, configurable bands)
- tests/test_eeg_gcnn.py — 23 tests using synthetic data
- examples/eeg_gcnn_nd_detection_gcn.py — 3 ablation experiments
- RST docs for dataset and task

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
"coherence" must be passed as "coh" to spectral_connectivity_epochs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The ablation script can now run without real TUAB/LEMON data using
`--demo`. Generates 40 synthetic patients with reproducible random
PSD features and adjacency matrices, runs all 3 experiments through
the full GCN training pipeline.

Also fixes a bug where roc_auc_score failed on single-column y_prob
output from binary classification.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jburhan jburhan marked this pull request as draft April 1, 2026 11:16
@jburhan jburhan closed this Apr 1, 2026
@jburhan jburhan reopened this Apr 1, 2026
@jburhan jburhan marked this pull request as ready for review April 1, 2026 11:20
@jburhan jburhan marked this pull request as draft April 1, 2026 11:20
Jimmy Burhan and others added 3 commits April 6, 2026 16:33
Rename task schema keys (psd_features→node_features, adjacency→adj_matrix)
to match the EEGGraphConvNet model interface. Add self-contained combined
pipeline script that runs both GCN and GAT models with demo mode, requiring
only torch + torch_geometric (no PyHealth install needed).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ation

- Restore accidentally dropped EEG_abnormal.py and EEG_events.py task
  files that were causing an ImportError on test collection.
- Add TestFunctionalAdjacency (10 tests) covering _build_functional_adjacency
  and combined adjacency mode; mne_connectivity is mocked via sys.modules
  so tests run in milliseconds with no real EEG dependency.
- Extend evaluate() in the ablation script to report Precision, Recall,
  F1, and Balanced Accuracy in addition to AUC, using Youden's J statistic
  for threshold selection — matching the evaluation protocol in Table 2 of
  Wagh & Varatharajah (2020).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add EEG task definitions and expand GCNN evaluation metrics
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant