← All Projects

Predicting Hospital Length of Stay

Forecasting patient length-of-stay at admission to help HealthPlus plan beds, staff, and resources

Overview

We built a model that estimates how many days a patient will stay so the hospital can plan beds and staff in advance.

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 started with half a million admission records, each describing a patient and their hospital visit.

Exploratory Analysis

We looked at how long patients typically stay and how the main numeric factors are distributed.

Key Drivers of Length-of-Stay

Stay length is shaped mostly by which ward and department a patient is in, plus illness severity and age.

Modeling & Results

A linear regression model predicts stay within about two days, and adding complexity did not improve it.

Key Takeaways

We delivered an accurate, easy-to-explain LOS model and pinpointed the few factors that matter most.

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.