gitwtfhub

wtf is readmission_project?

saikirannetha29/readmission_project — explained in plain English

Analysis updated 2026-05-18

12PythonAudience · dataComplexity · 2/5Setup · easy

TL;DR

A data science project that predicts which diabetic patients are likely to be readmitted to hospital within 30 days, with an interactive dashboard.

Mindmap

mindmap
  root((Readmission Project))
    What it does
      Predicts hospital readmission
      Cohort analysis
      Interactive dashboard
    Tech stack
      Python
      Scikit-learn
      XGBoost
      Streamlit
    Use cases
      Risk prediction
      Model comparison
      Patient risk calculator
    Audience
      Data scientists
      Healthcare analysts

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Explore a public hospital dataset to see which patient factors predict readmission risk.

REASON 2

Compare Logistic Regression, Random Forest, and XGBoost models on the same healthcare prediction task.

REASON 3

Use the Streamlit dashboard to calculate an individual patient's readmission risk interactively.

REASON 4

Learn how SQL cohort analysis can validate engineered features before training a model.

What's in the stack?

PythonPandasScikit-learnXGBoostStreamlit

How it stacks up

saikirannetha29/readmission_projectaim-uofa/reasonmatchairbone42/360-data-athlete
Stars121212
LanguagePythonPythonPython
Setup difficultyeasyhardhard
Complexity2/55/54/5
Audiencedataresearchergeneral

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · easy Time to first run · 30min

Requires downloading the public diabetes hospital dataset before running the pipeline scripts.

Wtf does this do

This project tries to predict which diabetic patients are likely to be readmitted to the hospital within 30 days of being discharged, using patient records instead of guesswork. Hospital readmissions are expensive and often a sign that a patient's care did not go as planned, so the goal is to flag high risk patients at discharge time so care teams can follow up with them first. The data comes from a public dataset of over 100,000 inpatient hospital visits across 130 US hospitals between 1999 and 2008. After removing duplicate visits and patients who died or entered hospice care, the working dataset has about 69,650 unique patient encounters, of which about 7 percent were readmitted within 30 days. The project runs as a series of steps. First it cleans the data and builds new features, such as turning age ranges into numbers and grouping diagnosis codes into broader categories. Next it loads the cleaned data into a small SQL database and runs queries to check patterns, like how readmission rates differ by age or by how many times a patient was hospitalized before. Then it trains three different prediction models, Logistic Regression, Random Forest, and XGBoost, and picks the best one based on a standard accuracy measure. Finally, a Streamlit dashboard lets anyone explore the cohort data, compare the models, and calculate an individual patient's risk score interactively. The best model, XGBoost, reached a score of about 0.68 on this measure, which the README says lines up with other published research on this same dataset, since predicting 30-day readmission is a genuinely hard problem given the data available. The models were tuned to catch as many true readmission cases as possible, since missing a high risk patient matters more than a false alarm. The biggest factors driving risk were prior hospital visits, length of the current stay, where the patient was discharged to, and their main diagnosis category.

Yoink these prompts

Prompt 1
Walk me through running this readmission prediction pipeline from data cleaning to the dashboard.
Prompt 2
Explain how the SQL cohort analysis step validates the engineered features before modeling.
Prompt 3
Help me understand why XGBoost was chosen over Random Forest and Logistic Regression here.
Prompt 4
What would I change in this pipeline to try it on a different patient dataset?

Frequently asked questions

wtf is readmission_project?

A data science project that predicts which diabetic patients are likely to be readmitted to hospital within 30 days, with an interactive dashboard.

What language is readmission_project written in?

Mainly Python. The stack also includes Python, Pandas, Scikit-learn.

How hard is readmission_project to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is readmission_project for?

Mainly data.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.