Skip to content

Add multi-task learning for Sleep Stage Classification and ADHD Detec…#10

Open
Abhro034 wants to merge 1 commit intotsy935:mainfrom
Abhro034:claude/add-model-execution-code-1iIQj
Open

Add multi-task learning for Sleep Stage Classification and ADHD Detec…#10
Abhro034 wants to merge 1 commit intotsy935:mainfrom
Abhro034:claude/add-model-execution-code-1iIQj

Conversation

@Abhro034
Copy link
Copy Markdown

…tion

This commit adds comprehensive support for multi-task learning with GraphS4mer, enabling simultaneous sleep stage classification and ADHD detection from PSG data.

Key features:

  • Multi-task GraphS4mer model with separate heads for sleep stages and ADHD
  • Custom dataset loader for handling both epoch-level and patient-level labels
  • Complete training pipeline with configurable loss weights
  • Inference script with detailed prediction outputs
  • Comprehensive documentation and example usage

New files:

  • model/multitask_graphs4mer.py: Multi-task model architecture
  • data/multitask_dataset.py: Data loading utilities
  • train_multitask.py: Training script with early stopping and checkpointing
  • inference_multitask.py: Inference script for predictions
  • example_multitask_usage.py: Complete example workflow
  • MULTITASK_README.md: Detailed documentation

Benefits:

  • No size mismatch issues with automatic resolution calculation
  • Flexible architecture supporting both S4 and GRU temporal models
  • Joint optimization leverages shared representations
  • Patient-level and epoch-level evaluation metrics
  • Production-ready with comprehensive error handling

…tion

This commit adds comprehensive support for multi-task learning with GraphS4mer,
enabling simultaneous sleep stage classification and ADHD detection from PSG data.

Key features:
- Multi-task GraphS4mer model with separate heads for sleep stages and ADHD
- Custom dataset loader for handling both epoch-level and patient-level labels
- Complete training pipeline with configurable loss weights
- Inference script with detailed prediction outputs
- Comprehensive documentation and example usage

New files:
- model/multitask_graphs4mer.py: Multi-task model architecture
- data/multitask_dataset.py: Data loading utilities
- train_multitask.py: Training script with early stopping and checkpointing
- inference_multitask.py: Inference script for predictions
- example_multitask_usage.py: Complete example workflow
- MULTITASK_README.md: Detailed documentation

Benefits:
- No size mismatch issues with automatic resolution calculation
- Flexible architecture supporting both S4 and GRU temporal models
- Joint optimization leverages shared representations
- Patient-level and epoch-level evaluation metrics
- Production-ready with comprehensive error handling
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