EEGDataset#

class dpeeg.datasets.EEGDataset(eegdataset: list[BaseData] | None = None, event_id: dict[str, int] | None = None, rename: str | None = None)[source]#
class dpeeg.datasets.EEGDataset(eegdataset: dict[int, BaseData] | None = None, event_id: dict[str, int] | None = None, rename: str | None = None)

Base EEG dataset.

Parameters:
  • eegdataset (list or dict of eegdata, optional) – The eegdata of different subjects. If None, initialize an empty dataset. If list, sort by subject one.

  • event_id (dict, optional) – The correspondence between labels and events.

  • rename (str, optional) – User renamed name. If None, the default class name is used.

Notes

The dataset supports different subjects with different eegdata types (such as EEGData, MultiSessEEGData and SplitEEGData), but it is recommended to unify the eegdata types of all subjects when performing transformation and training models to avoid unpredictable errors.

get_data()[source]#

Returns the eegdata of all subjects.

keys()[source]#

Return the list of subjects.

pop(subject: int, default=None)[source]#

Remove specified subject and return the corresponding eegdata.

If the subject is not found, return the default if given; otherwise, raise a KeyError.