Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧬 AI-Driven Clinical Early Warning & Predictive Marketing System

An advanced deep learning pipeline built to forecast chronic disease progression (Diabetes, Cardiovascular Risk, and Metabolic Stress) before critical onset. This project bridges the gap between raw clinical data and actionable business intelligence, enabling proactive healthcare interventions and targeted pharmaceutical marketing strategies.

🎯 Strategic Business Value

For modern pharmaceutical marketing and sales teams, predicting patient trajectories is invaluable. This system demonstrates how raw vitals can be transformed into foresight:

  • Targeted Outreach: Identifies pre-diabetic and high-CVD-risk demographics allowing for hyper-targeted educational campaigns and preventative care product marketing.
  • Sales Strategy: Empowers sales teams to align product availability with forecasted regional health trends based on real-time data ingestion.
  • Resource Allocation: Shifts the focus from reactive treatment to proactive care management.

🧠 Neural Architecture

This project implements a highly optimized multi-label Deep Learning model:

  • Temporal Attention Mechanism: An advanced custom Keras layer that forces the LSTM network to focus on specific, critical visits (e.g., sudden spikes in BMI or LDL) rather than treating all historical data equally.
  • Feature Trend Engineering (Deltas): The model dynamically calculates patient velocity (how fast vitals are changing), enabling the detection of pre-diabetes even when raw glucose levels appear stable.
  • F1-Balanced Threshold Optimization: Instead of standard binary cutoffs, the system mathematically hunts for the optimal decision boundary for each specific disease, ensuring maximum sensitivity (Recall) without triggering false-alarm fatigue (Precision loss).

πŸ› οΈ Tech Stack & Pipeline

  1. Data Generation & Infrastructure: Synthea (Generating realistic EHR data) deployed via Docker to an isolated PostgreSQL instance.
  2. ETL & Data Engineering: Custom Python/Pandas pipelines (etl_process.py) and complex SQL Views (analysis.sql) to clean, impute, and extract longitudinal patient timelines.
  3. Deep Learning Engine: TensorFlow/Keras (train_multilabel.py) utilizing LSTMs with Batch Normalization and Dropout for robust generalization.

πŸ“Š Performance Highlights

Tested on thousands of unseen patient records, the production model achieved:

  • CVD Risk: 93% Accuracy with balanced clinical thresholds.
  • Metabolic Stress: 75%+ Accuracy with high sensitivity for early intervention.
  • Diabetes (Critical): Maintained stable detection rates despite extreme class imbalance, prioritizing clinical safety over superficial accuracy.

πŸš€ How to Run

  1. Ensure the PostgreSQL database is running via docker-compose up -d.
  2. Activate the virtual environment.
  3. Run the optimized training and evaluation pipeline:
    python scripts/train_multilabel.py

About

Transforming raw EHR data into predictive clinical insights. A deep learning approach to proactive healthcare and targeted patient interventions.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages