moabb.paradigms.FilterBankMotorImagery

class moabb.paradigms.FilterBankMotorImagery(n_classes=2, **kwargs)[source][source]

Filter bank n-class motor imagery.

Metric is ‘roc-auc’ if 2 classes and ‘accuracy’ if more

Parameters
  • events (List of str) – event labels used to filter datasets (e.g. if only motor imagery is desired).

  • n_classes (int,) – number of classes each dataset must have. If events is given, requires all imagery sorts to be within the events list.

Attributes
datasets

Property that define the list of compatible datasets

scoring

Property that defines scoring metric (e.g.

Methods

get_data(dataset[, subjects, return_epochs])

Return the data for a list of subject.

is_valid(dataset)

Verify the dataset is compatible with the paradigm.

prepare_process(dataset)

Prepare processing of raw files

process_raw(raw, dataset[, return_epochs])

Process one raw data file.

used_events

property datasets

Property that define the list of compatible datasets

is_valid(dataset)[source][source]

Verify the dataset is compatible with the paradigm.

This method is called to verify dataset is compatible with the paradigm.

This method should raise an error if the dataset is not compatible with the paradigm. This is for example the case if the dataset is an ERP dataset for motor imagery paradigm, or if the dataset does not contain any of the required events.

Parameters

dataset (dataset instance) – The dataset to verify.

property scoring

Property that defines scoring metric (e.g. ROC-AUC or accuracy or f-score), given as a sklearn-compatible string or a compatible sklearn scorer.

Examples using moabb.paradigms.FilterBankMotorImagery