Add EEG task definitions and expand GCNN evaluation metrics#2
Merged
jburhan merged 2 commits intoeeg-gcnn-contributionfrom Apr 8, 2026
Merged
Add EEG task definitions and expand GCNN evaluation metrics#2jburhan merged 2 commits intoeeg-gcnn-contributionfrom
jburhan merged 2 commits intoeeg-gcnn-contributionfrom
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds EEG task definitions and significantly expands the evaluation pipeline for the EEG GCNN model:
New Features
EEG Task Definitions
pyhealth/tasks/EEG_abnormal.py: Binary classification task for abnormal EEG detection on TUAB datasetpyhealth/tasks/EEG_events.py: Multiclass classification task for EEG event annotation on TUEV datasetExtended Evaluation Metrics
Comprehensive Test Coverage
Changes