braindecode.datasets.BaseDataset#

class braindecode.datasets.BaseDataset(raw: BaseRaw, description: dict | Series | None = None, target_name: str | tuple[str, ...] | None = None, transform: Callable | None = None)[source]#

Returns samples from an mne.io.Raw object along with a target.

Dataset which serves samples from an mne.io.Raw object along with a target. The target is unique for the dataset, and is obtained through the description attribute.

Parameters:
  • raw (mne.io.Raw) – Continuous data.

  • description (dict | pandas.Series | None) – Holds additional description about the continuous signal / subject.

  • target_name (str | tuple | None) – Name(s) of the index in description that should be used to provide the target (e.g., to be used in a prediction task later on).

  • transform (callable | None) – On-the-fly transform applied to the example before it is returned.

Methods

set_description(description: dict | Series, overwrite: bool = False)[source]#

Update (add or overwrite) the dataset description.

Parameters:
  • description (dict | pd.Series) – Description in the form key: value.

  • overwrite (bool) – Has to be True if a key in description already exists in the dataset description.

Examples using braindecode.datasets.BaseDataset#

Convolutional neural network regression model on fake data.

Convolutional neural network regression model on fake data.