Hello! Apologies if this is covered somewhere else, but I haven't been able to find a solution online. I've done what I thought makes sense, but my classifier accuracy still hovers around 50%, so I wonder if my code is incorrect, or I just need more training data
Essentially, I want to train a classifier to differentiate left and right hand motor imagery using "plot_decoding_csp_eeg.py" as a template. I recorded .edf data from an OpenBCI headset using the Graz motor imagery scenario that comes with OpenViBE (I don't want to use OpenViBE's classifier).
Basically what I've changed is as follows:
#raw_fnames = eegbci.load_data(subject, runs)#raw = concatenate_raws([read_raw_edf(f, preload=True) for f in raw_fnames])fname = data/EDFTESTfilterandepoching.edfraw = concatenate_raws([read_raw_edf(fname, preload=True)])
as well as:
event_id = {OVTK_GDF_Left:4, OVTK_GDF_Right:5}events, _ = events_from_annotations(raw, event_id = event_id)
Where OVTK_GDF_Left and OVTK_GDF_Right are the native names of the stimulations
The only other things I've changed are the tmin and tmax values passed into the Epochs class, as well as in 'epochs.copy().crop(tmin,tmax)'
it's hard to tell without look at the data and testing ourself. Please
avoid using the issue tracker
for usage question. Use gitter or the regular mailing list.
Hello! Apologies if this is covered somewhere else, but I haven't been able to find a solution online. I've done what I thought makes sense, but my classifier accuracy still hovers around 50%, so I wonder if my code is incorrect, or I just need more training data
Essentially, I want to train a classifier to differentiate left and right hand motor imagery using "plot_decoding_csp_eeg.py" as a template. I recorded .edf data from an OpenBCI headset using the Graz motor imagery scenario that comes with OpenViBE (I don't want to use OpenViBE's classifier).
Basically what I've changed is as follows:
#raw_fnames = eegbci.load_data(subject, runs)
#raw = concatenate_raws([read_raw_edf(f, preload=True) for f in raw_fnames])
fname = data/EDFTESTfilterandepoching.edf
raw = concatenate_raws([read_raw_edf(fname, preload=True)])
as well as:event_id = {OVTK_GDF_Left:4, OVTK_GDF_Right:5}
events, _ = events_from_annotations(raw, event_id = event_id)
Where OVTK_GDF_Left and OVTK_GDF_Right are the native names of the stimulationsThe only other things I've changed are the tmin and tmax values passed into the Epochs class, as well as in 'epochs.copy().crop(tmin,tmax)'