Multi View Contrastive learning#1093
Open
coderookie1994 wants to merge 30 commits intosunlabuiuc:masterfrom
Open
Multi View Contrastive learning#1093coderookie1994 wants to merge 30 commits intosunlabuiuc:masterfrom
coderookie1994 wants to merge 30 commits intosunlabuiuc:masterfrom
Conversation
task outputs xt,dx,xf
Wip/mvcl model impl
…amend pooling to include residuals; 4. add MHA to finetune
small updated in task; plus unit test/exmaples/api docs
Potential fixes update
remove loop; added docstrings
Generic MVCL model
fixed feedbacks on gradescope
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Authors: Heyan Gao (heyan3@illinois.edu), Sharthak Ghosh(sghos52@illinois.edu)
Paper: https://arxiv.org/pdf/2506.22393
Overview
This PR adds the following: -
Task
MVCLTrainingSleepEEGtask returns sleep windows per patient based on the openly available SleepEDF dataset.xt,xd,xf. These are the Time, Derivative and Frequency tensors respectively.Examples
The example is here
examples\mvcl_training_sleepedf.ipynb.Models
There are two models,
MultiViewContrastiveModelwhich is the generic model that can work withnnumber of views andMultiViewContrastiveTimeSeriesModelthat specifically implments the paper as mentioned above.Associated Unit-Tests
Task tests here
tests\core\test_mvcl_training_sleepedf_task.pyModel tests here
tests\core\test_mvcl.pyDataset sources
https://physionet.org/content/sleep-edfx/1.0.0/
Complete List of files added/modified
docs/api/models/pyhealth.models.MVCL.rstdocs/api/tasks/pyhealth.tasks.MVCLTrainingSleepEEG.rstdocs/api/models.rstdocs/api/tasks.rstexamples/mvcl_training_sleepedf.ipynbpyhealth/datasets/sleepedf.pypyhealth/models/__init__.pypyhealth/models/multi_view_contrastive_time_series_model.pypyhealth/models/mvcl_model.pypyhealth/tasks/__init__.pypyhealth/tasks/mvcl_training_sleepedf_task.pytests/core/test_mvcl.pytests/core/test_mvcl_training_sleepedf_task.pyBug Fix
In
pyhealth/datasets/sleepedf.pythedevflag wasn't being propagated to the base class.