braindecode.datasets.TUHAbnormal

class braindecode.datasets.TUHAbnormal(path, recording_ids=None, target_name='pathological', preload=False, add_physician_reports=False)

Temple University Hospital (TUH) Abnormal EEG Corpus. see www.isip.piconepress.com/projects/tuh_eeg/html/downloads.shtml#c_tuab

Parameters
path: str

Parent directory of the dataset.

recording_ids: list(int) | int

A (list of) int of recording id(s) to be read (order matters and will overwrite default chronological order, e.g. if recording_ids=[1,0], then the first recording returned by this class will be chronologically later then the second recording. Provide recording_ids in ascending order to preserve chronological order.).

target_name: str

Can be ‘pathological’, ‘gender’, or ‘age’.

preload: bool

If True, preload the data of the Raw objects.

add_physician_reports: bool

If True, the physician reports will be read from disk and added to the description.

Attributes
cummulative_sizes
transform

Methods

get_metadata()

Concatenate the metadata and description of the wrapped Epochs.

save(path[, overwrite])

Save dataset to files.

split([by, property, split_ids])

Split the dataset based on information listed in its description DataFrame or based on indices.

cumsum

get_metadata()

Concatenate the metadata and description of the wrapped Epochs.

Returns
pd.DataFrame:

DataFrame containing as many rows as there are windows in the BaseConcatDataset, with the metadata and description information for each window.

save(path, overwrite=False)

Save dataset to files.

Parameters
path: str

Directory to which .fif / -epo.fif and .json files are stored.

overwrite: bool

Whether to delete old files (.json, .fif, -epo.fif) in specified directory prior to saving.

split(by=None, property=None, split_ids=None)

Split the dataset based on information listed in its description DataFrame or based on indices.

Parameters
by: str | list(int) | list(list(int))

If by is a string, splitting is performed based on the description DataFrame column with this name. If by is a (list of) list of integers, the position in the first list corresponds to the split id and the integers to the datapoints of that split.

property: str

Some property which is listed in info DataFrame.

split_ids: list(int) | list(list(int))

List of indices to be combined in a subset.

Returns
splits: dict{str: BaseConcatDataset}

A dictionary with the name of the split (a string) as key and the dataset as value.

Examples using braindecode.datasets.TUHAbnormal