-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add MaskEncoding augmentation #631
Add MaskEncoding augmentation #631
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #631 +/- ##
==========================================
+ Coverage 87.29% 87.34% +0.04%
==========================================
Files 67 67
Lines 6055 6083 +28
==========================================
+ Hits 5286 5313 +27
- Misses 769 770 +1 |
Hey @gustavohenriquesr, The code is already good, so I will ask something else: can you measure the impact of augmentation using the ShallowNet and BCNI datasets? To integrate something, we need to have some interesting results! The idea would be to do a cross-subject approach with 5-fold, very similar to Cedric's tutorial, but with a splitter for cross-validation with the augmentation. You can decide whether to validate the augmentation parameters or the probability. Use the same parameters from https://github.com/eeg-augmentation-benchmark/eeg-augmentation-benchmark-2022/blob/1df778f7359581b1297d18dbdabf2b2fd4fcfa2f/eeg_augmentation_benchmark/models.py#L64C1-L78C57 Small inspiration to build the cross-validation object:
If you need an extension for the deadline, ping me on Discord ;) |
Hello, @bruAristimunha Thank you for the patience. I did the tests you requested using a simplified strategy of what @cedricrommel proposed earlier for some other augmentations. The results show that using more than one segment benefits the model, while very high masking ratios when Leave it to you to decide whether it's worth adding this method to Braindecode. Later, with more time, I can do more tests with a wider range of values if you like. |
Amazing work @gustavohenriquesr ;) @agramfort, the green button is your! |
Hi, I've implemented another data augmentation class called MaskEncoding.
The idea is similar to SmoothTimeMask but there is no smoothing of the masking. In addition, the masking can be divided into parts and spread across the signal (these parts can overlap, and I chose to leave it this way). This implementation was initially based on this article, and I modified it as I saw appropriate.
Adresses #628