Added IAFDB Dataset and IAFClassification sample task. #408
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Students: Jake Cumberland (jakepc3), Swaroop Potdar (spotd)
Paper Title: Interpretation of Intracardiac Electrograms Through Textual Representations
Paper Link: https://arxiv.org/abs/2402.01115
Highlights
There are two new files, one in datasets called "IAFDBDataset.py" which contains the code for our new dataset object IAFDBDataset, and the other file is in tasks as "IAFClassificationTask.py" which contains the code for a custom task to test the IAFDBDataset. Changes have also been made to init in both tasks and datasets to recognize these classes.
The IAFDBDataset is meant to be used with the external dataset in the original paper available here: https://physionet.org/static/published-projects/iafdb/intracardiac-atrial-fibrillation-database-1.0.0.zip
The IAFDBDataset handles and preps the data in the same way as the original paper but some updates have been made to make it compatible with pyhealth and the BaseDataset class it derives from.
The IAFClassificationTask is a simple task to make sure IAFDBDataset is functioning correctly, it preps a sample for training.
Testing
You can test both the dataset and the task are functioning properly by running the following code:
dataset = IAFDBDataset("./intracardiac-atrial-fibrillation-database-1.0.0")
task = IAFClassificationTask(dataset)
x, y = task(task[0])
print(x.shape, y)
Which should print out (1000, 1)