Skip to content
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

Questions about training and testing phase #3

Open
homingZhang opened this issue Jul 15, 2020 · 2 comments
Open

Questions about training and testing phase #3

homingZhang opened this issue Jul 15, 2020 · 2 comments

Comments

@homingZhang
Copy link

Hi,
Thanks for sharing Pytorch version of EEGLearn.
Then, I am confused of the training and testing phase in the code.
The main purpose of the code is to use leave-one-out CV to evaluate the model.
However, it seems like that the code only selects 1 subject per time, then the training and testing phase are performed in this patient. Right?
image

In my opinion, the subject (including all the images) selected is the testing subject, all the other subjects are training subjects.

Hope to hear from you soon.

Thank you very much.

@VDelv
Copy link
Collaborator

VDelv commented Aug 17, 2020

Hi,

Thanks for the interest in the code and sorry for the late answer.
I first implemented (by mistake) the code with a simple participant dependent cross-validation (training and test from same subject).

If I have time I can put a simple implementation from scratch of LOSO cross-validation, it will be something like:

for patient in range(n_patient):
   idx = np.argwhere(Patient == patient)[:, 0]
   np.random.shuffle(idx)
   Test = Subset(Dataset, idx)
   idx = np.argwhere(Patient != patient)[:, 0]
   np.random.shuffle(idx)
   Train = Subset(Dataset, idx)

   Trainloader = DataLoader(Train, batch_size=64, shuffle=False)
   Testloader = DataLoader(Test, batch_size=64, shuffle=False)

I hope to have time to implement it correctly and let the user choose patient dependent or independent but I have a lot of side project for the moment.

I hope my temporary patch can help you,

Best,

@Ninggggy
Copy link

Hi,
I'm a student and interested on this code and your questions.
However it seems like that the file do not include the document of EEGLearn which you mentioned.
Hope to get in touch with you and get the document of EEGLearn!
Thank you!
Here is my wechat number NkLny_05621

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants