Skip to content

Srikeerthiraja/Patient-Survival-Prediction-ML

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Patient Survival Prediction using EHR Data

Predict patient survival (mortality) using Electronic Health Records (EHR) with machine learning.
This project uses multiple ML models, handles class imbalance, and interprets predictions with SHAP.


πŸ—‚ Project Structure


πŸ“Š Dataset

  • Source: [Patient Survival Prediction]
  • Rows: 91,713
  • Columns: 85
  • Features: Demographics, vitals, lab results, ICU scores (APACHE)
  • Target: survived (0 = Died, 1 = Survived)
  • Class distribution: Imbalanced β†’ handled using SMOTE and class-weighted models

πŸ›  Approach

  1. Data Cleaning & Preprocessing

    • Handle missing values using mean/median/mode
    • Remove duplicates
    • Encode categorical variables
    • Scale numeric features
  2. Feature Selection

    • ANOVA F-test, Mutual Information, Lasso
  3. Modeling

    • Logistic Regression (with Polynomial Features)
    • Random Forest (class_weight='balanced')
    • XGBoost
    • SVM, MLP Classifier
    • Train/Test split with stratification
  4. Class Imbalance Handling

    • SMOTE oversampling on training data
    • Class-weight balancing in models
  5. Model Evaluation

    • Accuracy, F1-score, Recall, Precision
    • ROC-AUC and confusion matrix
  6. Interpretability

    • SHAP TreeExplainer on XGBoost for feature importance and individual predictions

πŸ“ˆ Results

  • Top predictive features: ICU death probability, SpOβ‚‚ min, temperature min, Glasgow Coma Scale, ventilated status
  • Best performing model: XGBoost (Accuracy: ~0.88, F1-score: ~0.93, ROC-AUC: ~0.88)
  • SHAP insights:
    • High ICU mortality probability β†’ increases predicted death
    • Low oxygen saturation β†’ higher mortality risk
    • Ventilated patients β†’ higher predicted death risk

Example SHAP Summary Plot:
SHAP Summary

Example MODEL COMPARISION:
MODEL

Example ROC-AUC:
ROC-AUC


βš™ How to run

  1. Clone the repo:
git clone https://github.com/Srikeerthiraja/patient_survival_ml.git
cd patient_survival_ml

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors