pymovements.datasets.Dataset.__init__#

Dataset.__init__(root: str | Path, experiment: Experiment | None = None, filename_regex: str = '.*', filename_regex_dtypes: dict[str, type] | None = None, custom_read_kwargs: dict[str, Any] | None = None, dataset_dirname: str = '.', raw_dirname: str = 'raw', preprocessed_dirname: str = 'preprocessed', events_dirname: str = 'events')[source]#

Initialize the dataset object.

You can set up a custom directory structure by populating the particular dirname attributes. See dataset_dirname, raw_dirname, preprocessed_dirname and events_dirname for details.

Parameters:
  • root (str, Path) – Path to the root directory of the dataset.

  • experiment (Experiment) – The experiment definition.

  • filename_regex (str) – Regular expression which needs to be matched before trying to load the file. Named groups will appear in the fileinfo dataframe.

  • filename_regex_dtypes (dict[str, type], optional) – If named groups are present in the filename_regex, this makes it possible to cast specific named groups to a particular datatype.

  • custom_read_kwargs (dict[str, Any], optional) – If specified, these keyword arguments will be passed to the file reading function.

  • dataset_dirname (str, optional) – Dataset directory name under root path. Can be . if dataset is located in root path. Default: .

  • str (raw_dirname ;) – Name of directory under dataset path that contains raw data. Can be . if raw data is located in dataset path. We advise the user to keep the original raw data separate from the preprocessed / event data. Default: raw

  • optional – Name of directory under dataset path that contains raw data. Can be . if raw data is located in dataset path. We advise the user to keep the original raw data separate from the preprocessed / event data. Default: raw

  • preprocessed_dirname (str, optional) – Name of directory under dataset path that will be used to store preprocessed data. We advise the user to keep the preprocessed data separate from the original raw data. Default: preprocessed

  • events_dirname (str, optional) – Name of directory under dataset path that will be used to store event data. We advise the user to keep the event data separate from the original raw data. Default: events