sunlabuiuc/PyHealth

A Deep Learning Python Toolkit for Healthcare Applications.

What it solves

PyHealth is a deep learning toolkit designed to simplify the development, testing, and deployment of clinical predictive modeling. It addresses the complexity of building healthcare AI applications by providing a standardized, modular pipeline for processing medical data and implementing predictive models.

How it works

The toolkit organizes the healthcare ML workflow into a modular five-stage pipeline:

  1. Dataset: Loads and structures clinical datasets (e.g., MIMIC-III, MIMIC-IV, eICU, OMOP-CDM).
  2. Tasks: Processes patient data into specific samples for tasks like drug recommendation, mortality prediction, or readmission prediction.
  3. Models: Provides a library of 33+ pre-built ML models (including RNN, LSTM, Transformer, and specialized models like RETAIN and SafeDrug).
  4. Trainer: Manages training arguments, optimization, and model saving.
  5. Metrics: Evaluates performance using common clinical evaluation metrics.

Additionally, it includes independent modules for medical code mapping (ontology lookup and cross-system mapping) and a medical code tokenizer for converting string-based tokens to integer indices.

Who it’s for

It is built for ML researchers and medical practitioners who need to build reproducible and accessible clinical deep learning models.

Highlights

  • Healthcare-First: Native support for medical codes and major clinical datasets.
  • Extensive Model Library: Over 33 pre-built models ready for use.
  • High Performance: Data processing is approximately 3x faster than pandas.
  • Modular Design: Each stage of the pipeline can be used independently or customized.
  • Comprehensive Tooling: Includes built-in support for medical code mapping and tokenization.

Related

  • Project
  • Project
  • Project
  • Project
  • Project