pyhealth.tasks.benchmark_ehrshot#

class pyhealth.tasks.benchmark_ehrshot.BenchmarkEHRShot(task, omop_tables=None)[source]#

Bases: BaseTask

Benchmark predictive tasks using EHRShot.

Examples

>>> from pyhealth.datasets import EHRShotDataset
>>> from pyhealth.tasks import BenchmarkEHRShot
>>> dataset = EHRShotDataset(
...     root="/path/to/ehrshot/data",
...     tables=["ehrshot", "splits", "guo_icu"],
... )
>>> task = BenchmarkEHRShot(task="guo_icu")
>>> samples = dataset.set_task(task)
tasks = {'chexpert': ['chexpert'], 'lab_values': ['lab_thrombocytopenia', 'lab_hyperkalemia', 'lab_hypoglycemia', 'lab_hyponatremia', 'lab_anemia'], 'new_diagnoses': ['new_hypertension', 'new_hyperlipidemia', 'new_pancan', 'new_celiac', 'new_lupus', 'new_acutemi'], 'operational_outcomes': ['guo_los', 'guo_readmission', 'guo_icu']}#
task_name: str#
input_schema: Dict[str, Union[str, Type]]#
output_schema: Dict[str, Union[str, Type]]#
pre_filter(df)[source]#
Return type:

LazyFrame