The Python Library for Healthcare AI
.. card:: 🌐 Visit the PyHealth Project Website :link: https://pyhealth.dev :link-type: url :class-card: sd-bg-primary sd-text-white sd-text-center **pyhealth.dev** — the new home for PyHealth news, updates, and resources →
Build, test, and deploy healthcare machine learning models with ease. PyHealth is designed for both ML researchers and medical practitioners. We can make your healthcare AI applications easier to develop, test and validate. Your development process becomes more flexible and more customizable. [GitHub]
Key Features
- Dramatically simpler: Build any healthcare AI model in ~7 lines of code
- Blazing fast: Up to 39× faster than pandas for task processing
- Memory efficient: Runs on 16GB laptops
- True multimodal: Unified API for EHR, medical images, biosignals, clinical text, and genomics
- Production-ready: 25+ pre-built models, 20+ tasks, 12+ datasets with comprehensive evaluation tools
- Healthcare-first: Built-in medical coding standards (ICD, CPT, NDC, ATC) and clinical datasets (MIMIC, eICU, OMOP)
[News!] Join us for PyHealth Casual Chats – informal sessions where you can ask questions, discuss research ideas, or talk about PyHealth developments! Everyone is welcome. Join Zoom → | Add to Calendar →
[News!] We are continuously implementing good papers and benchmarks into PyHealth, checkout the [Planned List]. Welcome to pick one from the list and send us a PR or add more influential and new papers into the plan list.
PyHealth makes healthcare AI development simple and powerful. Build production-ready models with just a few lines of code.
from pyhealth.datasets import MIMIC3Dataset
from pyhealth.tasks import MortalityPredictionMIMIC3
from pyhealth.models import RNN
from pyhealth.trainer import Trainer
# Load healthcare data
dataset = MIMIC3Dataset(root="data/", tables=["diagnoses_icd", "procedures"])
samples = dataset.set_task(MortalityPredictionMIMIC3())
# Train model
model = RNN(dataset=samples)
trainer = Trainer(model=model)
trainer.train(train_dataloader, val_dataloader, epochs=50)That's it! You now have a trained healthcare AI model ready for deployment.
Getting Started Build your first healthcare AI model in 5 minutes |
Why PyHealth? Discover the comprehensive benefits and capabilities |
Installation Install PyHealth and set up your environment |
Research Initiative Join our year round research program and contribute |
Tutorials Hands-on notebooks and step-by-step guides |
Medical Standards Translate between medical coding systems (ICD, NDC, ATC, CCS) |
Community Join our Discord server and contribute to PyHealth |
Newsletter Stay updated with the latest PyHealth developments |
.. toctree:: :maxdepth: 4 :hidden: :caption: Getting Started why_pyhealth how_to_get_started install tutorials .. advance_tutorials
.. toctree:: :maxdepth: 4 :hidden: :caption: Documentation api/overview api/data api/datasets api/graph api/tasks api/models api/processors api/interpret api/trainer api/tokenizer api/metrics api/medcode api/calib
.. toctree:: :maxdepth: 2 :hidden: :caption: Additional Information how_to_contribute research_initiative newsletter live log about