PyHealth icon indicating copy to clipboard operation
PyHealth copied to clipboard

Init Commit, adding files for importing heart disease dataset and tas…

Open runalih opened this issue 1 month ago • 0 comments

In this PR we are including 3 new files that aim to add a new dataset and a task to go along with that dataset.

This dataset is Heart_Disease_UCI.csv. It contains many columns that all pertains to a patients current health status (e.g. age, sex, cholesterol, blood pressure) and their current heart problems. Using this csv file, we’ve created a Dataset that is imported into pyhealth to interpret this data.

This data is then pulled into a task that aims to use the columns in this dataset to try to predict where or not patients have any heart issues. This task also provides a train/testing split in order to test if the model is accurate.

New Files added/modified: pyhealth/datasets/heart_dataset.py pyhealth/datasets/rawdata/heart_disease_uci.csv pyhealth/tasks/heart_task.py

Examples of usages: # pull in datasets from local

dataset = HeartDiseaseDataset(root="pyhealth/datasets/rawdata/heart_disease_uci.csv")

# run tasks on dataset to predict information

task = HeartDiseasePrediction(dataset)



# output information on splits

(train_X, train_y), (test_X, test_y) = task.split()

runalih avatar Dec 08 '25 05:12 runalih