-
Notifications
You must be signed in to change notification settings - Fork 280
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
Can't reproduce experimental results of BCI Competition IV dataset 2a for within classification #31
Comments
Hi please use EEGNetv4 (https://github.com/braindecode/braindecode/blob/644ac12752e962c6a2506a071bebc4378297450b/braindecode/models/eegnet.py#L25) to reproduce results from braindecode |
I just tried EEGNetv4 from braindecode, but the results was still same(mean accuracy 61). I think that the problem may lie in preprocessing part. Could you give me advice about preprocessing? |
@realblack0 See the following the Colab notebook, the preprocessing is taken from this repo https://github.com/iis-eth-zurich/eeg-tcnet , it has basic operations of segmentation and normalization no filtering is applied, I've used it to test the equivalence of EEGNet implementations from Keras and Braindecode.
The notebook is self contained, with all instructions available from data download to evaluation. Here it is you can play with it: |
Thanks for your reply,But i want to ask where has normalization in the Colab notebook, I just see segmentation. |
the normalization is applied with these lines :
|
@okbalefthanded: I had the same issue as @realblack0 and scaling the input resolved the issue for EEGNet. Further I tried to reproduce the ShallowNet results with the original model from braindecode (pytorch/skorch). @robintibor: Maybe this Conv2dWithConstraint should be added to the original ShallowNet Implementation? |
@martinwimpff Indeed the kernel constraint has a significant effect on the results, for my PyTorch implementation of EEGModels code , I re-implemented the kernel constraint for both the Conv2D and Linear layers as it is implemented in Keras.
|
Hello, I would like to replicate EEGnet using PyTorch and validate it on the BCI competition iV2a dataset. I've encountered an issue with low accuracy. Could you please provide guidance on how to set the max_value for MaxNorm? Additionally, can you share the steps you followed for preprocessing the dataset? Have you normalized the data? Could you also share your code? |
The default values as the Keras/TF implementation will produce similar values with the PyTorch version, check your pre-processing operations first, they are the most crucial parts. Yes, we do normalize the data before training. |
Hello.
I am trying to reproduce experimental results of BCI Competition IV dataset 2a for within classification in the paper.
I reused EEGNet class but got mean accuracy 60~63. I expected around 68.
I read #7 and tried EEGNet-8,2, with kernLength = 32.
I did 4-fold blockwise cross-validation that splits training set into three equal contiguous partitions(96/96/96) and selects each one of three partitions as validation set while retaining test set(288). So there were three training for each subject.
I did preprocess using braindecode. And I also tried preprocessing uisng scipy, but got similar accuracy.
In my thought, I missed something in preprocessing.
Could you check the code below and help me find something I missed?
Or, it would be thankful if you share the preprocessing code you used.
Here is code using braindecode:
The text was updated successfully, but these errors were encountered: