Skip to content

Conversation

@Razin93937
Copy link
Contributor

@Razin93937 Razin93937 commented Dec 24, 2025

Contributor: Sayeed Sajjad Razin (razin93937@gmail.com)
Contribution Type: Update Dataset, Task, Example

Description
This PR introduces support for the TUEV (TUH EEG Events) dataset in PyHealth 2.0, including a new EEGEventsTUEV task for EEG event classification and a quickstart notebook demonstrating dataset loading and model training.

Files to review

Files to review

  • pyhealth/datasets/configs/tuev.yaml - New configuration file for TUEV dataset structure
  • pyhealth/datasets/tuev.py - Updated TUEVDataset class with metadata preparation and default task property
  • pyhealth/task/__init__.py - Added import for EEGEventsTUEV task
  • pyhealth/task/temple_university_EEG_tasks.py - Added EEGEventsTUEV class for multi-class EEG event detection
  • examples/conformal_eeg/tuev_eeg_quickstart.ipynb - New Jupyter notebook with end-to-end example for loading TUEV data, setting tasks, and training a simple CNN classifier
  • tests/core/test_tuev.py - Added unit tests for the TUEV dataset and accompanying task.

Copy link
Collaborator

@jhnwu3 jhnwu3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late review, so close. I am very excited to send this to Jathurshan for testing.

I think what'll be really cool is testing if our parallel processing approach can speed up development haha.

dataset_name: name of the dataset.
root: root directory of the raw data. *You can choose to use the path to Cassette portion or the Telemetry portion.*
dataset_name: name of the dataset.
config_path: Optional configuration file name, defaults to "tuev.yaml".
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It sounds silly, but can we add some of the example code in the docstrings here (i.e how a user would quickly initialize and use it)? And maybe a pointer to the notebook that people would refer to here if they wanted to use it.


signals, times, rec, raw = self.readEDF(edf_path)
signals = self.convert_signals(signals, raw)
feats, offending_channels, labels = self.BuildEvents(signals, times, rec)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By any chance, can we split the label processing into something separate from the signal processing?

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.

2 participants