-
Notifications
You must be signed in to change notification settings - Fork 183
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 match_all
method in paradigm to support CompoundDataset evaluation with MNE epochs
#473
Conversation
# Conflicts: # moabb/datasets/fake.py
moabb/paradigms/base.py
Outdated
def match_all(self, datasets: List[BaseDataset]): | ||
""" | ||
Initialize this paradigm to match all datasets in parameter: | ||
- `self.resample` is set to match the minimum frequency in all datasets, minus 0.5. | ||
If the frequency is 128 for example, then MNE can returns 128 or 129 samples | ||
depending on the dataset, even if the length of the epochs is 1s | ||
The `-0.5` solves this particular issue. | ||
- `self.channels` is initialized with the channels which are common to all datasets. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you make the -0.5 Hz a default parameter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM to me, just change the frequency padding to a parameter.
Can you please alter the what's new file? @gcattan |
Thank you @gcattan! |
CompoundDataset supports the merging of datasets with different sampling frequencies and channels.
When Epochs are used for evaluation, MNE failed to merge epochs with different frequencies and channels.
This PR introduces the
match_all
method in theBaseParadigm
. It initialized theresample
andchannels
members of a paradigm to be compatible with the sampling frequency and channels of all datasets passed as parameters.@bruAristimunha FYI