Skip to content

Conversation

@tanub22
Copy link

@tanub22 tanub22 commented Jul 25, 2025

Author: Muni T. Bondu

Type of contribution: Dataset and Task

High level description:
I've implemented a Length of Stay (LOS) prediction dataset and task for PyHealth. This contribution includes:

  • LOSDataset: A BaseDataset implementation for hospital admission/discharge data
  • LOSTask: A BaseTask implementation for predicting length of stay based on temporal admission features
  • Synthetic sample data generator for testing
  • YAML configuration following PyHealth standards
  • Example usage with scikit-learn for demonstration

Files to review for testing:

  • pyhealth/contrib/tasks/length_of_stay/task.py - Main implementation
  • pyhealth/contrib/tasks/length_of_stay/lengthofstay.yaml - Configuration file
  • pyhealth/contrib/tasks/length_of_stay/fake_los_data.csv - Sample data

Test case: Run python task.py in the length_of_stay directory to see the full demo including:

  • Dataset loading and processing
  • Task creation and feature extraction
  • call method testing
  • Simple prediction model example

@jhnwu3 jhnwu3 added the Highlight for TAs to highlight label Aug 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Highlight for TAs to highlight

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants