Skip to main content

Solutions · Healthcare

Data Science Binary classification

Predict 30-day hospital readmission

Score every hospital encounter for 30-day readmission risk with a binary-classification model — demographics, admission and discharge details, length of stay, diagnoses, medications, labs, and prior visits — to prioritize post-discharge follow-up.

Data Science Langsat Team 7 min read
20
Highest-risk encounters surfaced for follow-up
2.27–2.32
Risk-score band across the top cohort
65%
Of the top 20 are emergency admissions

The problem

Predict 30-day hospital readmission (binary: 0 = not readmitted, 1 = readmitted) for each encounter using clinical and administrative features — patient demographics, admission details, discharge disposition, length of hospital stay, procedure / medication / diagnosis counts, lab results, diabetes medications, and prior-visit history. The model outputs a risk score per encounter, so care teams can prioritize discharge follow-up interventions where they matter most.

See the model in action

This is the live trained model. Each encounter is scored for 30-day readmission risk — higher means more likely to return within 30 days.

Live model — 30-day readmission risk

Trained on Langsat

Open in Langsat ↗

Ask a question in plain English

You ask

“Which 20 encounters have the highest readmission risk?”

#Encounter IDPatient IDAgeGenderRaceAdmission typeDischarge dispositionRisk score
11206259689406271770-80MaleCaucasian312.324
2142557522194329850-60MaleCaucasian112.323
32551767302322888340-50FemaleAfrican American132.321
41013032328477482550-60FemaleCaucasian3182.321
51571485142339217940-50MaleCaucasian112.317

Top 5 of the 20 highest-risk encounters. Admission type 1 = emergency; discharge disposition 1 = discharged home. The full ranked list is in the dashboard below.

Explore the 20 highest-risk encounters

The same result, as an auto-generated dashboard you can share with a link — no login required for viewers.

Shared dashboard — top-20 highest-risk encounters

Auto-generated · read-only share link

Open in Langsat ↗

What the model found

The model scores every encounter; the dashboard above zooms in on the 20 with the highest risk. Read as a group, they share a clear profile.

A tight band at the very top

All 20 sit in a narrow risk-score band of 2.271–2.324 (mean 2.298), with encounter 120625968 at the top (2.324). A tight cluster at the extreme end is what you want to see — these are the model’s most-confident readmission risks, so follow-up effort spent here is effort spent well.

Who’s most at risk

Within this cohort of 20:

  • Gender — 80% male (16 of 20), 20% female (4). But the highest average score skews female (2.307) over male (2.295).
  • Age — the 70–80 group is the most common (30%, 6 of 20), while the 50–60 group carries the highest average risk (2.311).
  • Race — 75% Caucasian (15), 25% African American (5); average risk is close across both (2.299 vs 2.294).

The clinical pattern

  • Emergency admissions dominate — admission type 1 (emergency) accounts for 13 of 20 (65%).
  • Most go home — and are still high-risk — discharge disposition 1 (home) covers 15 of 20 (75%). The rest split across special dispositions (two to 22, two to 3, one to 18).

That combination — an emergency admission discharged home — is the signature of this high-risk group. These are exactly the patients who leave without a structured hand-off and can bounce back within the month.

Highest-risk combinations

A few demographic-and-clinical combinations rise to the top:

  • 40–50, female, African American — 2.321 (highest)
  • 50–60, female, Caucasian — 2.321 (tied)
  • 70–80, male, Caucasian — 2.296 (the most common high-risk group, 6 cases)

These patterns describe the 20 highest-risk encounters, not the whole population. Use them to target interventions — not to profile patients.

What to do with it

The score turns a discharge list into a priority queue. The clearest action: give emergency admissions who are discharged home enhanced post-discharge monitoring — a follow-up call, medication reconciliation, or a home-health referral — while they’re still inside the 30-day window.

Why it’s worth solving

A 30-day readmission is rarely just a number. It’s a patient who got worse after going home — and a bed that fills back up with a problem that was often preventable.

The stakes are clinical and financial at once. Readmissions are among the most scrutinized events in a hospital: Medicare’s Hospital Readmissions Reduction Program ties a share of hospitals’ reimbursement to their 30-day rates, and widely cited estimates put the cost of avoidable readmissions in the tens of billions of dollars a year. Behind each one is the human cost of a recovery that didn’t hold.

But the binding constraint usually isn’t money — it’s attention. No care team can give every discharge a follow-up call, a medication review, and a home-health referral. That capacity is finite, and today it’s spread evenly across a discharge list where the risk is anything but even.

Follow-up capacity is finite. A risk score decides where it goes.

That’s the leverage. Ranking every encounter by risk sends the same limited hours to the patients most likely to return — the emergency admissions discharged home, not the routine cases that were always going to be fine. Even a small, targeted drop in readmissions pays for the effort many times over: in avoided penalties, in beds freed for the next patient, and in outcomes that never show up on an invoice.

How Langsat builds this

This is a Data Science project with a binary-classification target (readmitted within 30 days: yes or no).

  1. Point Langsat at your encounter data — and the tables around it: patients, diagnoses, medications, labs, prior visits. You don’t pre-join them.
  2. Train on the relationships, not a flattened table. Langsat’s relational models read the patient graph directly — a patient’s diagnoses, medications, and prior encounters all inform the score — so signal that manual flattening throws away is kept.
  3. Review the model, then serve it. Langsat reports the standard binary-classification metrics for you to check before anything ships. Once you’re satisfied, every encounter gets a live risk score through the prediction API and the dashboards you saw above.
  4. Ask questions in plain English“which 20 encounters have the highest readmission risk?” — and share a read-only dashboard with the discharge team by link.

The whole thing runs on Langsat’s secure cloud — your data isolated to your account, encrypted in transit and at rest, and never used to train models for anyone else.

Try it yourself

Every trained model gets a REST endpoint. Change the inputs below and run it against the live model.

Try the model

Change the inputs and run a real prediction.

live model

Patient encounter

27 further features (diagnosis codes, lab counts, and the full diabetes-medication panel) are sent unchanged.

Result

recorded

probability

69.4%

Likely to be readmitted within 30 days

prediction
1
probability
0.6942819952964783
task_type
binary_classification
mode
inductive
version_label
v1

A real response from this model, recorded on 2026-08-03. The model ID is redacted — you call your own. Unused result fields (multiclass, clustering, anomaly, and link-prediction slots) are omitted for brevity.

FAQ

Frequently asked questions

Is 30-day readmission prediction regression or classification?

It's binary classification — the target is 0 (not readmitted within 30 days) or 1 (readmitted). Langsat also returns a continuous risk score per encounter, so you can rank and prioritize rather than only label.

What data does the model use?

Encounter-level clinical and administrative features: patient demographics, admission type, discharge disposition, length of stay, procedure / medication / diagnosis counts, lab results, diabetes medications, and prior-visit history. Multiple linked tables are fine — you don't pre-join them.

Do I have to flatten my tables into one CSV first?

No. Langsat Data Science trains directly on the relational structure — patients linked to encounters, diagnoses, medications, and labs — so the signal in those relationships isn't lost to manual flattening.

How do care teams use the risk score?

Rank encounters by score and route the highest-risk discharges to enhanced follow-up — medication reconciliation, a scheduled check-in call, or a home-health referral — before the 30-day window closes.

Where does the patient data live?

On Langsat's secure cloud — hosted in Singapore by default, with US or EU hosting available on request. Your data is isolated to your account, encrypted in transit and at rest, never used to train models for anyone else, and you can delete it at any time. Handling protected health information is your call to make under your own compliance program; talk to us about your requirements before uploading PHI.

Build this on your own data

Point Langsat at your data, pick the task, and train a real model — no feature engineering, no infrastructure to run. Your data stays private: isolated to your account and encrypted in transit and at rest.