obob_mne.decoding.Temporal¶
-
class
obob_mne.decoding.Temporal(epochs, pipeline, epochs_test=None, cv=2, scoring='accuracy', n_jobs=-1, metadata_querylist=None, metadata_querylist_test=None)[source]¶ Apply a decoding pipeline to every sample.
Use this class to perform Temporal decoding. This means that a classifier is trained on every sample and tested on that very sample.
The minimum requirements are the data as
mne.Epochsand the pipeline assklearn.pipeline.Pipeline, which is most commonly generated usingsklearn.pipeline.make_pipeline().This class treats every individual
event_idas an individual target. If you want to combine multipleevents_idinto one target, you can useepochs.collapse_conditions().If you want the training and testing data to be different, you can supply the training data to
epochsand the testing data toepochs_test.Cross validation will be run only if training and testing data are equal (i.e., when
epochs_test=None).Parameters: - epochs (
mne.Epochs) – The epochs to apply the classifier pipeline to. - pipeline (
sklearn.pipeline.Pipeline) – The classifier pipeline to use. Most likely created withsklearn.pipeline.make_pipeline() - epochs_test (
mne.Epochsor None, optional) – If set, the classifier gets tested on this data. The event_ids must be equal. No crossvalidation will be run in this case. - cv (int, optional) – The amount of folds for cross validation
- scoring (str or callable, optional) – The scoring function to use.
- n_jobs (int, optional) – Number of CPU cores to use
-
decoder¶ The decoder.
- epochs (