save_dataset#

dpeeg.datasets.save_dataset(folder: str | Path, dataset: BaseDataset, compress: bool = False, name_folder: bool = True, progressbar: bool = True)[source]#

Save the eegdata dataset to a folder.

The eegdata in the dataset is stored separately by subject, and a .json formatted file describing the basic information of the dataset is saved. Use dpeeg.datasets.LoadDataset to read the saved dataset.

Parameters:
  • folder (str, Path) – The folder location where the dataset is saved.

  • dataset (eegdata dataset) – An eegdata dataset to be saved.

  • compress (bool) – If True, each subject’s eegdata is saved using standard ZIP compression.

  • name_folder (bool) – If True, a subfolder with the name of the dataset is created under the folder folder and saved.

  • progressbar (bool) – Whether to show the progress bar.

Returns:

path – Dataset save folder.

Return type:

Path