KatInterview

Classifying Imbalanced Clinical Outcomes Under Heavy Missing Data

Machine LearningModel answer
HardModel answerMachine Learningmissing-dataclass-imbalancelogistic-regression

Last updated

Architect an end-to-end binary classification pipeline for readmissions with missing data, extreme class imbalance, metrics choice, and feature-engineered logistic regression.

You are tasked with designing a production-grade binary classifier to predict 30-day hospital readmissions using combined electronic health records (EHR) and insurance claims data.

The dataset presents two primary technical challenges:

  • Missing Data: Approximately 30% of total values are missing across the feature space, with non-uniform distribution across rows and columns.
  • Class Imbalance: Only 6% of historical admissions result in a 30-day readmission (positive class rate = 0.06).

Provide a structured engineering and modeling strategy covering the following four areas:

  1. Missingness Architecture & Validation:

    • How to diagnose the underlying missingness mechanisms: Missing Completely at Random (MCAR), Missing at Random (MAR), and Missing Not at Random (MNAR).
    • Rules for deciding whether to drop versus impute specific rows or columns.
    • Design of at least two concrete imputation strategies (e.g., deterministic/simple, model-based, or indicator-augmented).
    • How to validate missingness handling inside a cross-validation framework to prevent data leakage.
  2. Metrics & Threshold Optimization:

    • Define key performance metrics: Accuracy, Precision, Recall, Specificity, F1-score, ROC-AUC, PR-AUC, and Probability Calibration.
    • Provide two distinct clinical use cases: one where Recall is prioritized and one where Precision is prioritized, justifying the tradeoff in each context.
    • Explain how threshold selection, business/clinical cost matrices, or utility curves dictate operational decision boundaries.
  3. Imbalance Handling & Evaluation Protocols:

    • Detail at least three distinct strategies for addressing the 6% positive rate (e.g., cost-sensitive weighting, resampling schemes, threshold-moving, or specialized loss functions).
    • Detail the exact evaluation setup (e.g., stratified and grouped cross-validation, temporal split) required to eliminate leakage and optimistic metric inflation.
  4. Enhancing Generalized Linear Models (Logistic Regression):

    • Outline specific feature engineering, regularization, non-linear transformations (such as splines), interaction detection, and calibration post-processing (e.g., Platt scaling or Isotonic regression) to optimize a logistic regression model.
    • Describe a systematic ablation protocol to quantify performance lift against a baseline model.

Hints

Hint 1

Ensure data splitting accounts for multi-visit patients to prevent identity leakage across folds.

Hint 2

Pay close attention to how re-sampling or probability-shifting methods alter final probability calibration.

Hint 3

Evaluate metric selection specifically under low-prevalence regimes (6% positive rate).