← All Projects

Predicting Hospital Length of Stay for HealthPlus

A deployable regression model that forecasts patient length of stay at admission to plan beds, staff, and resources

Overview

We built a tool that estimates how many days a patient will stay in the hospital so the hospital can plan beds and staff ahead of time.

Methodology

flowchart LR
  A[Raw Data] --> B[Clean & Encode]
  B --> C[EDA]
  C --> D[Train/Test Split]
  D --> E["Random Forest / Linear Regression / Ridge / Lasso"]
  E --> F["Tune (Cross-Validation)"]
  F --> G["Evaluate: R2 / RMSE"]

The Data

We used records of half a million hospital admissions, each describing the patient, their ward, department, and their actual stay.

Exploratory Analysis

We looked at patterns in the data and found that the department and ward, not the numeric measurements, explain how long patients stay.

Modeling & Results

We tested several prediction methods and a Random Forest, after fine-tuning, gave the most accurate length-of-stay estimates.

Productionizing the Model

We packaged the trained model into a file so it can be saved, shared, and loaded by a live system to make predictions on new patients.

Key Takeaways

Knowing a patient's likely length of stay at admission helps the hospital staff its busiest departments and manage resources.

More Visualizations

Tech Stack

Attribution

This project was completed as part of the MIT Applied Data Science Program (MIT IDSS / Great Learning). The program provided the case-study scaffolding; the analysis, code, and results are my own. Published with permission, for portfolio use only.