MAMEM / eeg-processing-toolbox

Matlab code for proccesing EEG signals.
http://www.mamem.eu/
Apache License 2.0
76 stars 38 forks source link

Error in ssveptoolkit.classification.LIBSVMFast/build #48

Closed iaaly closed 8 years ago

iaaly commented 8 years ago

Hi, I'm getting the following error related to LIBSVMFAST during the execution of the exampleDefault:

feature extraction ...
evaluating..
leaving subject #1 out
Error using svmtrain (line 233)
Y must be a vector or a character array.

Error in ssveptoolkit.classification.LIBSVMFast/build (line 59)
                LSVM.models{i} = svmtrain(labels,
                [(1:size(LSVM.Ktrain,1))',
                LSVM.Ktrain+eye(size(LSVM.Ktrain,1))*realmin],
                sprintf(' -t 4 -c %f -b 1 -q', LSVM.cost));

Error in ssveptoolkit.experiment.Experimenter/leaveOneSubjectOutFast
(line 262)
            E.classification.build();

Error in ssveptoolkit.experiment.Experimenter/run (line 102)
                            E.leaveOneSubjectOutFast(subjects(i),
                            instanceSet);

Error in exampleDefault (line 36)
experiment.run();

Can you please help me to fix this?

liarosge commented 8 years ago

Hi, you must include the libsvm Matlab folder in your Matlab path (Make sure that the .mex files are generated). The error is caused because the Matlab's "svmtrain" function is executed instead of the libsvm's one.