garethjns / Kaggle-EEG

Seizure prediction from EEG data using machine learning. 3rd place solution for Kaggle/Uni Melbourne seizure prediction competition.
101 stars 29 forks source link

train.m error #10

Closed ThomasDang93 closed 7 years ago

ThomasDang93 commented 7 years ago

Hello there, I was trying to run train.m and I get this error message.

Insufficient number of outputs from right hand side of equal sign to satisfy assignment.

Error in featuresObject/checkFiles (line 378)
                    files{1,d} = fn.name;

Error in featuresObject/compileFeatures (line 74)
            obj.files =  obj.checkFiles();

I am entirely new to MatLab so I am struggling of identifying where this error is coming from. I have the original kaggle data located in the Original folder. I wasn't sure what to put in the New folder since you mentioned a second test set. So I simply copy test sets 1, 2, and 3 from the Original folder onto the New folder. Before I got the error the code was copying the training sets from original folder onto the new folder. And I noticed that three .mat files were created onto the directory, "Singles1.mat, Singles2.mat, and Singles3.mat".

I am not sure if that is where the error is coming from but maybe you can shed some light on what is going on here?

garethjns commented 7 years ago

Hi Thomas,

This error is a bit different from importing errors I've had before so I'm not immediately sure what's causing it. Is your data directory set up as per the pictures in the readme? With the new test set as a subfolder named "New"?

You don't need to copy anything from the original folder into the "New" folder, just extract the new test set (ie. the second test set released on Kaggle - do you have a copy of this?) into there. The new training set is created in there by train.m which also creates the "Singles*.mat" files which just list the training data that's not part of a whole hour.

Also, please could you let me know which version of MATLAB are you running?

Thanks.

ThomasDang93 commented 7 years ago

My directory is EEG Data/New/test_1_New. So that should align with the screenshot from the readme. However I do not have the second test set released on kaggle. I can't access that second test set because the competition hosts removed all the data. Does this mean that I am out of luck?

The version of Matlab that I am running is 2017a. I just noticed that you ran yours in 2016b, so I am not sure if that could be a potential problem. Should I just download 2016b just to be safe?

garethjns commented 7 years ago

I don't think the second set is still available for download, but you could try asking the admins if it would be possible to get hold of a copy.

It should still be possible to work with the test set you already have though, as long as the folder struture is the same as the readme. Just put the test set you have in the test_x_new folders (as you've already done), then comment out the lines in train.m that run the copyTestLeakToTrain.m function. This function only needs to be run once to prepare the training set, then training should run (even if it crashes trying to set up the test set).

Hopefully, after that the predict script will run ok as well with the manually set up test set - the filenames are a bit different between the new and old sets, but if I remember correctly this shouldn't matter. I'll check this sometime this week.

Regarding the version of MATLAB, version 2016b onwards should work, but I haven't tested 2017a myself yet.