Skip to content

Add Length of Stay Dataset and Prediction Task #526

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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