The quality team wants a flag that lights up on admission for patients likely to be back within 30 days. Build the pipeline that would earn your trust, then write the memo that says which model to use and why — backed by a notebook you wrote.
A starter notebook (project-starter.ipynb)
with load_and_recode() already written, the feature list, a split_by_patient(df, seed)
stub (signature only — the body is yours, see s1-3), and an empty labelled cell per checkpoint.
Each checkpoint is one observable artifact you build yourself. Checking all six flips this module's mastery to "project complete" in the tracker. No auto-grading — you mark it once the artifact exists.
A patient-safe train/test split, plus the same model scored under a naive visit-level split, with the gap stated in one sentence.
Groups by patient_nbr (or one visit per patient) and says why in Module 02's terms
(independence); reports whichever direction the data gives, not the expected one — on this feature set the
gap turns out to be small, and saying so honestly is part of a solid answer.
Linear regression for time_in_hospital on ≥2 features, one coefficient fit by hand and matched
to the library, RMSE/MAE/R² reported in days.
Slope read in the column's units; says which of RMSE/MAE the hospital should care about; R² stated as a share, not a grade. Note: your single-feature hand-fit slope from s2-1 will not exactly match that feature's coefficient in the multi-feature model — that's expected when features are correlated, not a bug.
Logistic regression and a depth-limited tree on the patient-safe split, confusion matrices for both, and one held-out patient's tree path written as a rule chain.
Both matrices on the same test rows; the rule chain in plain language (built from
decision_path, not eyeballed); the two models compared on recall at a matched flagged rate, not on
accuracy.
A chosen threshold with precision and recall at that threshold, one sentence rejecting accuracy explicitly, and the cost assumption that drove the choice.
Names the 88.8% baseline as the reason accuracy is the wrong scoreboard here; the cost assumption is stated as a number or ratio the hospital could disagree with (e.g. "a missed readmission costs 10x a wasted call").
k-means on ≥4 standardised utilisation features with the label held out, k chosen with the elbow (ambiguity acknowledged), each cluster named in ≤5 words, readmission rate per cluster shown and labelled as after-the-fact.
Features were scaled and you say why (s5-1); one k-means assumption named that the data likely violates (e.g. unequal cluster sizes); the after-the-fact rates not presented as validation.
≤1 page, plain language, no code: which model to trust for the flag, at what threshold, what it will miss, one thing it cannot explain, and what the hospital would have to measure after deployment to know it's working.
Leads with the answer; reports recall and flagged rate, not accuracy; states that the model was scored patient-safe; names the leak and the imbalance as the two ways the number could have lied; the deployment check is a measurable quantity (e.g. "recall on the next quarter's actual readmissions").
Score both classifiers with AUC (see s3-3) and see whether the ranking changes. Or refit the models on first-visit-per-patient rows only and compare with the grouped split — unverified by this module's research, so you're on your own here, which is the point.