Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Nov 25 16:47

    cedricrommel on master

    Implement ATCNet Create ATCNet test Update api.rst and whats_new.rst and 15 more (compare)

  • Nov 25 16:47
    cedricrommel closed #429
  • Nov 25 14:18
    codecov[bot] commented #429
  • Nov 25 14:06
    codecov[bot] commented #429
  • Nov 25 14:05
    cedricrommel synchronize #429
  • Nov 25 13:30
    cedricrommel commented #429
  • Nov 25 13:30
    codecov[bot] commented #429
  • Nov 25 13:30
    cedricrommel synchronize #429
  • Nov 25 13:23
    codecov[bot] commented #429
  • Nov 25 13:23
    cedricrommel synchronize #429
  • Nov 25 13:04
    tomMoral commented #429
  • Nov 25 12:59
    codecov[bot] commented #429
  • Nov 25 12:48
    cedricrommel commented #429
  • Nov 25 12:48
    cedricrommel review_requested #429
  • Nov 25 12:48
    cedricrommel review_requested #429
  • Nov 25 12:47
    codecov[bot] commented #429
  • Nov 25 12:47
    cedricrommel synchronize #429
  • Nov 25 12:45
    codecov[bot] commented #429
  • Nov 25 12:43
    cedricrommel commented #429
  • Nov 25 12:40
    cedricrommel commented #429
Maciej Sliwowski
@sliwy
One thing that may help to understand, it may be dividing this notebook into sections (like in the beginning) to focus attention, e.g "Dataset splitting" or "Creating windows"
It really helps a lot in understanding the dataset structures!
gemeinl
@gemeinl
Sure, I can easily swap the order. I just wanted to give this to you guys as fast as possible. I will make a proper plot_....py out of it.

also, if we already had mne epochs, would there also be a clear way atm? is this not intended atm? how is it?

I will see to this next. It could become a bit more tricky, though. The WindowsDataset gives x, y, ind, where y and ind are read from the metadata pandas.DataFrame from the mne.Epochs objects. If it is not there, you have to manually add it. I have never tried it, will see how it can be done.

gemeinl
@gemeinl
There is still the CroppedXyDataset but this should not be used, right? If I remember correctly, you wanted this to be removed @robintibor
robintibor
@robintibor
If we have very simple way to go from X y directly to windows dataset, then this could be removed, yes
like dataset = create_from_X_y(X,y)
with dataset being windows dataset
gemeinl
@gemeinl
such a function does not exsist yet, but i think this would be the way to go: https://gist.github.com/gemeinl/1220413cb4418a94c48b71c5014bb390#file-braindecode_xy_data_example-ipynb
Both examples i now sent would benefit from removing pandas import, i believe. We could do this by changing description argument of BaseDataset from pandas.Series to dict and cast it internally. What do you think abou this?
robintibor
@robintibor
ya why not, you could also support both as argument if there is something you may need to supply as series sometimes, i am not deep inside to judge
x y looks great, would be super to make it into single function
gemeinl
@gemeinl
I agree, making a function and removing XyDataset would be great :)
robintibor
@robintibor
@sliwy will work today more, is it fine if I take over your pull request at some point if necessary?
Maciej Sliwowski
@sliwy
@robintibor yeah, feel free to review/improve it. I did almost everything, no point in holding it back.
robintibor
@robintibor
great
robintibor
@robintibor
now starting some extensive refactorings
Alexandre Gramfort
@agramfort
robintibor
@robintibor
deploy of docs failed multiple times with some error about read-only SSH key, so I added a User key under https://app.circleci.com/settings/project/github/braindecode/braindecode/ssh?return-to=https%3A%2F%2Fapp.circleci.com%2Fpipelines%2Fgithub%2Fbraindecode%2Fbraindecode @agramfort
here circleci code is indeed read-only, I don't know if that is a problem: https://github.com/braindecode/braindecode/settings/keys
robintibor
@robintibor
image.png
if you asked about touching something before, them I am not aware of it. the screenshot above shows something visible under https://github.com/braindecode/braindecode/settings/keys , which I do not know why it happened
Alexandre Gramfort
@agramfort
ok something was changed
one needs to have read write keys in sync between circle ci and github
robintibor
@robintibor
on master it seemed to work again after I added this user key
Alexandre Gramfort
@agramfort
great !
anhnguyenducminh
@anhnguyenducminh
anhnguyenducminh
@anhnguyenducminh
Hi all, we are a team of students in Singapore investigating the relationship between environment, physiological measurement and electroencephalography. Currently, we are using deep learning to connect EEG measurement and other data types. We currently intend to use EEG data as input for our regression model to predict other measurements. As we have never used deep learning on EEG data before we do not know how to start. We are using OpenBCI cyton so the EEG data that we stored are in txt file – which can be made into numpy array. We are intending to use Braindecode, we did manage to store our data as MNE raw arrays and after reading the documentation, we managed to create a BaseConcatDataset (we are not sure if we set the parameters for create_from_X_y correctly, I am still not sure on the meaning of window in the structure). After that we are not what preprocessing method and regression parameters to use. Thank you very much for your help.
robintibor
@robintibor
Hi
anhnguyenducminh
@anhnguyenducminh
Thank you for the link, I have finished most of it, and got the model to start running but when there are multiple targets in the regression model ( I follow the regression example in braindecode.org), I encounter this error:

AttributeError Traceback (most recent call last)

<ipython-input-11-596ca18789b8> in <module>()
112 )
113
--> 114 regressor.fit(train_set, y=None, epochs=n_epochs)

6 frames
/content/notebooks/braindecode/util.py in iter(self)
364 x = x.type(torch.float32)
365 if self.is_regression:
--> 366 y = y.type(torch.float32)
367 else:
368 y = y.type(torch.int64)

AttributeError: 'list' object has no attribute 'type'

Thank you for your help
robintibor
@robintibor
hmh did you figure out a solution? I guess if you could make sure that the ys are somehow not a list would be good, like that they are tensors already ... not sure... maybe we alsoneed to fix on our side @anhnguyenducminh
Sylvain Chevallier
@sylvchev
Hi @robintibor
The new version of MOABB (0.4.5) is out and your PR on the updated dataset is included. I just pushed it on PyPi, it should be available soon.
robintibor
@robintibor
Thanks @sylvchev !
Bru
@bruAristimunha
hey @robintibor,
In the end I really needed the permission in your folk. Thank you!
Gigi Vissers
@gigivis_gitlab
Hi all, through the braindecode website i was directed to this chat to find help with my issue. I am trying to reproduce this example (#3: k-fold cross validation - https://braindecode.org/master/auto_examples/plot_how_train_test_and_tune.html#sphx-glr-auto-examples-plot-how-train-test-and-tune-py), but using cropped decoding for my model instead of trialwise decoding as was used in the example here. I am unable to make this example work for cropped decoding, can anyone direct me to an example? I can make everything work with my data up until the cross_val_score() function from sklearn.model_selection). If necessary, I can provide screenshots in a private message, as the data I am using is confidential. Thanks in advance!
Bru
@bruAristimunha
Hello Gigi!
Bru
@bruAristimunha

How cool that you are using the new braindecode tutorials! We were happy with that. I can help you, but using the issue system, okay?

Copy and paste what you wrote here and try to put a minimum code so we can reproduce your error. Please do not put your confidential data; try to reproduce the error with the same data from the tutorial. I feel this is an issue with the cropped option, given the way it does the slicing, but we need to reproduce it to be sure. If it's just a problem with your code or a problem with braindecode, we can solve it.

Please let me know if you need assistance opening the new issue, @gigivis_gitlab

Gigi Vissers
@gigivis_gitlab
Hello! I forgot to mention the specific error I receive: "ValueError: not enough values to unpack (expected 3, got 2), which directs me to line 179 in classifier.py from the braindecode package
1 reply
Ah yes of course, I will try and reproduce the error with the data from your example and I will report back, thank you!
1 reply
Gigi Vissers
@gigivis_gitlab
I was able to reproduce the exact same error! What I did: follow the entire tutorial from this link (https://braindecode.org/master/auto_examples/plot_bcic_iv_2a_moabb_cropped.html), but I added the following from the previous link: create the X_train and y_train objects and the corresponding train and val subsets, and rather than fitting the model with "clf.fit(train_set, y=None, epochs=n_epochs)", I used the CV-approach: "from sklearn.model_selection import KFold, cross_val_score
train_val_split = KFold(n_splits=5, shuffle=False)
fit_params = {"epochs": n_epochs}
cv_results = cross_val_score(
clf, X_train, y_train, scoring="accuracy", cv=train_val_split, fit_params=fit_params
)"
Using this, I get the error that I mentioned above. Hope that is clear enough wrt describing minimum code!
Bru
@bruAristimunha
Nice! Can you copy this text and put on an issue: https://github.com/braindecode/braindecode/issues/new
@gigivis_gitlab