Patients & Events
+ pyhealth.data +How a longitudinal record is modeled: build Event and Patient objects and query a history with get_events() filters.
diff --git a/data/tasks.json b/data/tasks.json index 7c56af4..83aa4d3 100644 --- a/data/tasks.json +++ b/data/tasks.json @@ -83,7 +83,7 @@ "MIMIC-IV" ], "description": "Predict onset of diabetic ketoacidosis (DKA) from clinical event sequences in ICU patients.", - "colab_url": "https://colab.research.google.com/drive/1kKkkBVS_GclHoYTbnOtjyYnSee79hsyT?usp=sharing", + "colab_url": "https://colab.research.google.com/drive/1QB0acnGb-wOuK53UNSgHxjCW74QeYjUl?usp=sharing", "docs_url": "https://pyhealth.readthedocs.io/en/latest/api/tasks/pyhealth.tasks.dka.html", "source_file": "pyhealth/tasks/dka.py", "modality": [ @@ -108,7 +108,7 @@ "TUAB" ], "description": "Classify clinical EEG recordings as normal or abnormal using deep signal models.", - "colab_url": "https://colab.research.google.com/drive/1kKkkBVS_GclHoYTbnOtjyYnSee79hsyT?usp=sharing", + "colab_url": "https://colab.research.google.com/drive/1QB0acnGb-wOuK53UNSgHxjCW74QeYjUl?usp=sharing", "docs_url": "https://pyhealth.readthedocs.io/en/latest/api/tasks/pyhealth.tasks.temple_university_EEG_tasks.html", "source_file": "pyhealth/tasks/temple_university_EEG_tasks.py", "modality": [ @@ -157,7 +157,7 @@ "COSMIC" ], "description": "Classify genomic variants as pathogenic or benign using sequence-based features.", - "colab_url": "https://colab.research.google.com/drive/1kKkkBVS_GclHoYTbnOtjyYnSee79hsyT?usp=sharing", + "colab_url": "https://colab.research.google.com/drive/1QB0acnGb-wOuK53UNSgHxjCW74QeYjUl?usp=sharing", "docs_url": "https://pyhealth.readthedocs.io/en/latest/api/tasks/pyhealth.tasks.MutationPathogenicityPrediction.html", "source_file": "pyhealth/tasks/variant_classification.py", "modality": [ @@ -182,7 +182,7 @@ "TCGA-PRAD" ], "description": "Predict 5-year survival of prostate cancer patients from multi-omics profiles.", - "colab_url": "https://colab.research.google.com/drive/1kKkkBVS_GclHoYTbnOtjyYnSee79hsyT?usp=sharing", + "colab_url": "https://colab.research.google.com/drive/1QB0acnGb-wOuK53UNSgHxjCW74QeYjUl?usp=sharing", "docs_url": "https://pyhealth.readthedocs.io/en/latest/api/tasks/pyhealth.tasks.CancerSurvivalPrediction.html", "source_file": "pyhealth/tasks/cancer_survival.py", "modality": [ @@ -207,7 +207,7 @@ "MIMIC-III" ], "description": "Determine whether two clinical records belong to the same patient across fragmented health systems.", - "colab_url": "https://colab.research.google.com/drive/1kKkkBVS_GclHoYTbnOtjyYnSee79hsyT?usp=sharing", + "colab_url": "https://colab.research.google.com/drive/1QB0acnGb-wOuK53UNSgHxjCW74QeYjUl?usp=sharing", "docs_url": "https://pyhealth.readthedocs.io/en/latest/api/tasks.html", "source_file": "pyhealth/tasks/patient_linkage_mimic3.py", "modality": [ @@ -241,7 +241,7 @@ "MIMIC-III" ], "description": "Predict ICU length of stay as one of multiple duration buckets from admission data.", - "colab_url": "https://colab.research.google.com/drive/1kKkkBVS_GclHoYTbnOtjyYnSee79hsyT?usp=sharing", + "colab_url": "https://colab.research.google.com/drive/1QB0acnGb-wOuK53UNSgHxjCW74QeYjUl?usp=sharing", "docs_url": "https://pyhealth.readthedocs.io/en/latest/api/tasks/pyhealth.tasks.length_of_stay_prediction.html", "source_file": "pyhealth/tasks/length_of_stay_prediction.py", "modality": [ @@ -267,7 +267,7 @@ "SleepEDF" ], "description": "Classify 30-second EEG epochs into Wake, N1, N2, N3, or REM sleep stages.", - "colab_url": "https://colab.research.google.com/drive/1kKkkBVS_GclHoYTbnOtjyYnSee79hsyT?usp=sharing", + "colab_url": "https://colab.research.google.com/drive/1QB0acnGb-wOuK53UNSgHxjCW74QeYjUl?usp=sharing", "docs_url": "https://pyhealth.readthedocs.io/en/latest/api/tasks/pyhealth.tasks.SleepStagingSleepEDF.html", "input_schema": { "signal": "tensor" @@ -291,7 +291,7 @@ "TUEV" ], "description": "Classify EEG events into six types including spike-wave complexes, periodic discharges, and artifacts.", - "colab_url": "https://colab.research.google.com/drive/1kKkkBVS_GclHoYTbnOtjyYnSee79hsyT?usp=sharing", + "colab_url": "https://colab.research.google.com/drive/1QB0acnGb-wOuK53UNSgHxjCW74QeYjUl?usp=sharing", "docs_url": "https://pyhealth.readthedocs.io/en/latest/api/tasks/pyhealth.tasks.temple_university_EEG_tasks.html", "source_file": "pyhealth/tasks/temple_university_EEG_tasks.py", "modality": [ @@ -363,7 +363,7 @@ "EHRShot" ], "description": "15-task few-shot benchmark suite for evaluating clinical foundation models on real-world EHR prediction challenges.", - "colab_url": "https://colab.research.google.com/drive/1kKkkBVS_GclHoYTbnOtjyYnSee79hsyT?usp=sharing", + "colab_url": "https://colab.research.google.com/drive/1QB0acnGb-wOuK53UNSgHxjCW74QeYjUl?usp=sharing", "docs_url": "https://pyhealth.readthedocs.io/en/latest/api/tasks/pyhealth.tasks.benchmark_ehrshot.html", "input_schema": { "feature": "sequence" @@ -387,7 +387,7 @@ "MIMIC-III" ], "description": "Recommend a safe set of medications for a patient visit given their diagnosis and procedure history.", - "colab_url": "https://colab.research.google.com/drive/1kKkkBVS_GclHoYTbnOtjyYnSee79hsyT?usp=sharing", + "colab_url": "https://colab.research.google.com/drive/1QB0acnGb-wOuK53UNSgHxjCW74QeYjUl?usp=sharing", "docs_url": "https://pyhealth.readthedocs.io/en/latest/api/tasks/pyhealth.tasks.drug_recommendation.html", "source_file": "pyhealth/tasks/drug_recommendation.py", "modality": [ @@ -437,7 +437,7 @@ "BMDHS" ], "description": "Classify cardiac valve disease conditions from phonocardiogram (PCG) heart sound recordings.", - "colab_url": "https://colab.research.google.com/drive/1kKkkBVS_GclHoYTbnOtjyYnSee79hsyT?usp=sharing", + "colab_url": "https://colab.research.google.com/drive/1QB0acnGb-wOuK53UNSgHxjCW74QeYjUl?usp=sharing", "docs_url": "https://pyhealth.readthedocs.io/en/latest/api/tasks/pyhealth.tasks.bmd_hs_disease_classification.html", "source_file": "pyhealth/tasks/bmd_hs_disease_classification.py", "modality": [ @@ -495,7 +495,7 @@ "COSMIC" ], "description": "Predict functional impact and cancer driver gene status of somatic mutations.", - "colab_url": "https://colab.research.google.com/drive/1kKkkBVS_GclHoYTbnOtjyYnSee79hsyT?usp=sharing", + "colab_url": "https://colab.research.google.com/drive/1QB0acnGb-wOuK53UNSgHxjCW74QeYjUl?usp=sharing", "docs_url": "https://pyhealth.readthedocs.io/en/latest/api/tasks/pyhealth.tasks.VariantClassificationClinVar.html", "source_file": "pyhealth/tasks/variant_classification.py", "modality": [ @@ -520,7 +520,7 @@ "eICU" ], "description": "Medication recommendation from multi-center ICU data with cross-site generalization evaluation.", - "colab_url": "https://colab.research.google.com/drive/1kKkkBVS_GclHoYTbnOtjyYnSee79hsyT?usp=sharing", + "colab_url": "https://colab.research.google.com/drive/1QB0acnGb-wOuK53UNSgHxjCW74QeYjUl?usp=sharing", "docs_url": "https://pyhealth.readthedocs.io/en/latest/api/tasks/pyhealth.tasks.drug_recommendation.html", "source_file": "pyhealth/tasks/drug_recommendation.py", "modality": [ @@ -546,7 +546,7 @@ "TCGA-PRAD" ], "description": "Predict tumor mutation burden (TMB) as a continuous value from multi-omics cancer profiles.", - "colab_url": "https://colab.research.google.com/drive/1kKkkBVS_GclHoYTbnOtjyYnSee79hsyT?usp=sharing", + "colab_url": "https://colab.research.google.com/drive/1QB0acnGb-wOuK53UNSgHxjCW74QeYjUl?usp=sharing", "docs_url": "https://pyhealth.readthedocs.io/en/latest/api/tasks/pyhealth.tasks.CancerMutationBurden.html", "source_file": "pyhealth/tasks/cancer_survival.py", "modality": [ diff --git a/datasets.html b/datasets.html index e3c1762..2b1ead1 100644 --- a/datasets.html +++ b/datasets.html @@ -294,7 +294,7 @@
A unified API for loading healthcare data across electronic health records, physiological signals, medical imaging, genomics, and clinical text — all ready for machine learning.
Production-ready models spanning EHR sequence learning, drug recommendation, biosignal analysis, graph neural networks, medical imaging, and clinical NLP — all with a unified training API.
Standardized clinical prediction task definitions — from mortality and readmission to drug recommendation, sleep staging, and genomic analysis. Call dataset.set_task() and you're ready to train.
PyHealth Tutorials
+Runnable notebooks that walk through each PyHealth module, then put them together into complete clinical ML pipelines. Most run on public or synthetic data, so you can start without credentialed access.
+ +One notebook per module, in the order data flows through PyHealth: data → datasets → tasks → models → trainer → metrics.
+How a longitudinal record is modeled: build Event and Patient objects and query a history with get_events() filters.
Load MIMIC-III and COVID19-CXR, explore events efficiently, and see how to define and contribute your own dataset with a YAML config.
+ +Write your own BaseTask to turn a dataset into model-ready samples, with medical coding and chest X-ray examples.
The BaseModel contract, synthetic data with create_sample_dataset(), and how RNN and MultimodalRNN work inside.
Train an RNN for mortality prediction on synthetic MIMIC-III (no credentials needed): splits, early stopping, checkpoints, and inference.
+ +Binary, multiclass, and multilabel metrics, plus fairness metrics such as disparate impact, and how to get raw predictions from the trainer.
+ +Build a Vocabulary and Tokenizer, then encode flat code lists (2D) and visit-level histories (3D) with padding and truncation.
Look up ICD, ATC, and CCS codes, walk code hierarchies with InnerMap, and translate between systems with CrossMap.
The videos are recordings from PyHealth Live sessions on the earlier 1.x API. The concepts carry over, but follow the notebooks for current code.
+Complete workflows that load a dataset, define a task, train a model, and evaluate it. Each one runs on public Kaggle data, an open MIMIC demo, or synthetic MIMIC-III, so no credentialed access is needed to try them.
+Classify chest X-rays from the public COVID-19 Radiography Database, from download through training and evaluation.
+COVID19CXRDatasetTorchvisionModelPredict ICD-9 codes from clinical notes in synthetic MIMIC-III, fine-tuning Bio_ClinicalBERT.
+MIMIC3DatasetTransformersModelClassify Kaggle medical transcriptions by specialty with a pretrained transformer.
+MedicalTranscriptionsDatasetTransformersModelPredict mortality on the open MIMIC-III demo from diagnosis, procedure, and drug codes across visits.
+MIMIC3DatasetRNNPredict 30-day readmission on the public MIMIC-IV demo with Readmission30DaysMIMIC4.
MIMIC4DatasetRNNPut a HuggingFace tokenizer inside TupleTimeTextProcessor and train MLP, Transformer, and RNN models on mixed codes and clinical text.
Mortality, readmission, drug recommendation, sleep staging, chest X-ray, interpretability, and more. Not every script has been updated for PyHealth 2.0 yet.
+ +Which datasets are public, which need PhysioNet credentialing, and how to download each one.
+ +