a data journal Β· 101,766 patients

Predicting Hospital Readmissions Through Explainable Data Analytics.

A handmade journal that turns validated statistical evidence into an interactive prediction experience. No black boxes β€” every number knows where it came from.

from the notebook
The strongest single predictor
0%
0 prior admissions
0%
5 prior admissions
Nearly 4Γ— the risk β€” a clean, monotonic story we could defend without hand-waving.
Strongest Evidence ⭐
chapter one

The project

Using the Diabetes 130-US Hospitals dataset, we asked one honest question: which patient characteristics actually predict a 30-day hospital readmission? We cleaned the data, ranked the evidence, rejected what was noisy, and turned what survived into an interactive scoring engine that shows its work.
chapter two

The dataset at a glance

Diabetes 130-US Hospitals Β· 1999–2008
Total patients
0
Readmission rate
0%
Avg. length of stay
0 d
Avg. medications
0
Avg. diagnoses
0
chapter three

Exploratory analysis, one chart at a time

Every chart from the notebook, reborn on the web β€” each one with its purpose, what we observed, how we interpreted it, and the business impact.

Age distribution

Descriptive Β· Accepted
Context chart
Purpose
Understand the demographic makeup of the cohort.
Observation
The dataset skews heavily toward patients aged 60–90.
Interpretation
Older patients dominate β€” a critical context for every later comparison.
Business impact
Prevents mistaking population weight for causal effect.
Interpret with Caution

Age vs. readmission rate

Accepted with caution
β˜…β˜…β˜†β˜†β˜†
Purpose
Determine whether specific age groups have higher 30-day readmission rates.
Observation
The 20–30 band shows the highest percentage (~14.2%), while the elderly dominate absolute counts.
Interpretation
Reported as two facts β€” never as β€˜older = highest risk’.
Business impact
Down-weighted in the prediction engine to avoid misleading conclusions.

Length of stay vs. readmission

Accepted
β˜…β˜…β˜…β˜†β˜†
Purpose
Check whether longer hospital stays are associated with higher readmission.
Observation
Rises from 8.18% at 1 day to 14.35% at 10 days β€” ~75% relative increase.
Interpretation
Described as association, not causation.
Business impact
Included as moderate-confidence factor (weight 12%).

Medication count vs. readmission

Accepted
β˜…β˜…β˜…β˜†β˜†
Purpose
Check whether patients on more medications are readmitted more often.
Observation
7.44% at 5 medications rises to 13.11% at 20 β€” a ~76% relative increase.
Interpretation
Reflects disease complexity β€” medication burden as a proxy for severity.
Business impact
Included as moderate-confidence factor (weight 18%).

Number of diagnoses vs. readmission

Accepted
β˜…β˜…β˜…β˜…β˜†
Purpose
Determine whether patients with more diagnoses are more likely to return.
Observation
5.94% at 1 diagnosis climbs to 17.65% at 10 β€” nearly 3Γ— higher.
Interpretation
Disease complexity is a strong, monotonic driver.
Business impact
High-confidence factor in the engine (weight 25%).
Strongest Evidence ⭐

Previous inpatient admissions vs. readmission

Strongest finding
β˜…β˜…β˜…β˜…β˜…
Purpose
Identify whether repeat hospitalizations predict future readmissions.
Observation
Clean rise from 8.44% (0 prior) to 31.40% (5 prior).
Interpretation
The most defensible predictor β€” cause and behaviour aligned.
Business impact
Anchor of the prediction engine (weight 40%).

Correlation heatmap

Exploratory only
Exploration
time in hosp
lab proc
procedures
medi
outpatient
emergency
inpatient
diagnoses
time in hosp
1.00
0.32
0.19
0.47
-0.01
-0.01
0.07
0.22
lab proc
0.32
1.00
0.06
0.27
-0.01
0.00
0.04
0.15
procedures
0.19
0.06
1.00
0.39
-0.02
-0.04
-0.07
0.07
medi
0.47
0.27
0.39
1.00
0.05
0.01
0.06
0.26
outpatient
-0.01
-0.01
-0.02
0.05
1.00
0.09
0.11
0.09
emergency
-0.01
0.00
-0.04
0.01
0.09
1.00
0.27
0.06
inpatient
0.07
0.04
-0.07
0.06
0.11
0.27
1.00
0.10
diagnoses
0.22
0.15
0.07
0.26
0.09
0.06
0.10
1.00
Purpose
Examine relationships between numeric variables.
Observation
Time in hospital ↔ medications (0.47) is the strongest pair; inpatient/emergency (0.27) links repeat-use patients.
Interpretation
Used only to inform feature selection, not to claim cause and effect.
Business impact
Guided which variables to advance into the engine.

Emergency visits vs. readmission

NOT USED IN THE PREDICTION ENGINE
Why it was rejected
Cohorts of 1–9 patients at high visit counts produced 100% readmission rates β€” statistically unusable spikes.
How to read this chart
Excluded from the prediction engine. The bars for cohorts under n=100 are shown in solid red so you can see exactly which values are unreliable. Any bar drawn from a cohort of fewer than 100 patients is rendered in solid coral β€” treat those as noise, not signal.

Outpatient visits vs. readmission

NOT USED IN THE PREDICTION ENGINE
Why it was rejected
Same failure mode as emergency visits β€” a handful of patients with many prior outpatient visits distort every rate calculation.
How to read this chart
Excluded from the engine. The soft trend is real, but the tail is too sparse to trust. Any bar drawn from a cohort of fewer than 100 patients is rendered in solid coral β€” treat those as noise, not signal.

Risk difference table

Length of Stay
1 day β†’ 8.18%
10 days β†’ 14.35%
Medication Count
5 meds β†’ 7.44%
20 meds β†’ 13.11%
Diagnoses
1 diag β†’ 5.94%
10 diag β†’ 17.65%
Previous Admissions
0 β†’ 8.44%
5 β†’ 31.40%
chapter four

The evidence podium

πŸ₯‡

Previous Admissions

β˜…β˜…β˜…β˜…β˜…
Very High Confidence

Strongest validated predictor. Monotonic rise from ~8.44% (0 admissions) to 31.40% (5), the most defensible signal in the dataset.

πŸ₯ˆ

Number of Diagnoses

β˜…β˜…β˜…β˜…β˜…
High Confidence

Readmission climbs from ~5.94% (1 diagnosis) to 17.65% (10). Nearly threefold β€” disease complexity matters.

πŸ₯‰

Medication Count

β˜…β˜…β˜…β˜…β˜…
Moderate Confidence

Rises from 7.44% (5 meds) to 13.11% (20). A proxy for burden of illness, not a cause in itself.

4️⃣

Length of Stay

β˜…β˜…β˜…β˜…β˜…

8.18% (1 day) β†’ 14.35% (10 days). Longer stays associated with more severe illness.

5️⃣

Age

β˜…β˜…β˜…β˜…β˜…

20–30 band spikes to 14.2%; elderly dominate absolute counts. Interpret carefully β€” never in isolation.

6️⃣

Correlation Matrix

Used for feature exploration only. Never invoked to claim causation.

❌

Emergency & Outpatient

Rejected β€” sparse categories produced unstable 100% spikes. Excluded from the engine.

chapter five

The explainable prediction engine

No machine learning β€” a transparent, evidence-weighted score that always shows how each factor contributed. Move a slider, watch the story change.

weights = validated evidence

Patient factors

Move a slider β€” the evidence-weighted risk updates instantly, with a full breakdown.

1
Evidence weight 40% Β· Contribution 8.0 pts
5
Evidence weight 25% Β· Contribution 11.1 pts
12
Evidence weight 18% Β· Contribution 8.2 pts
4 days
Evidence weight 12% Β· Contribution 2.8 pts
65 yrs
Evidence weight 5% Β· Contribution 3.2 pts

Excluded by evidence review

Emergency Visits
Outpatient Visits
Evidence-weighted risk
33
/ 100
Moderate Risk

Comparable to the cohort average β€” monitor discharge follow-up.

Overall evidenceβ˜…β˜…β˜…β˜…β˜…High
Feature contributions
Previous Admissions8.0 pts
Number of Diagnoses11.1 pts
Medication Count8.2 pts
Length of Stay2.8 pts
Age3.2 pts

Number of Diagnoses is currently the dominant factor, adding 11.1 points to the evidence-weighted risk. Previous inpatient admissions carry the highest validated confidence (β˜…β˜…β˜…β˜…β˜…) and shape the overall verdict most strongly; age is deliberately down-weighted because its per-band spikes reflect population imbalance more than causal risk.

Includes your evidence journey, slider inputs, and the final explainable prediction.

chapter six

Insights we would defend in a room of clinicians

1

Repeated hospitalizations were the strongest indicator of future readmissions.

2

Disease complexity β€” captured through diagnosis and medication counts β€” significantly increased readmission likelihood.

3

Medication burden almost certainly reflects illness severity rather than causing readmissions itself.

4

Longer hospital stays were associated with greater readmission risk.

5

Age alone should never be interpreted in isolation β€” the 20–30 spike is a small-cohort artefact.

6

Emergency and outpatient visit counts were intentionally excluded because the evidence was unreliable.

7

The correlation matrix informed feature exploration but never claimed causation.

closing chapter

Evidence, made honest.

The best model is the one that explains itself. Every number on this page can be traced back to a chart, a cohort, a validated finding. That is what makes it trustworthy β€” not the size of a network, but the clarity of a story.

Random fact from the dataset

Patients with 5 previous inpatient admissions had nearly 4Γ— the readmission rate of patients with none.

β˜• β€œEvery chart tells a story β€” if you let it finish.”