MITDBDataset¶
- class torch_ecg.databases.datasets.MITDBDataset(config: CFG, task: str, training: bool = True, lazy: bool = True, **reader_kwargs: Any)[source]¶
-
Data generator for feeding data into pytorch models using the
MITDB
database.- Parameters:
config (dict) –
Configurations for the dataset, ref. MITDBDataset. A simple example is as follows:
>>> config = deepcopy(MITDBDataset) >>> config.db_dir = "some/path/to/db" >>> dataset = MITDBDataset(config, task="qrs_detection", training=True, lazy=False)
training (bool, default True) – If True, the training set will be loaded, otherwise the test (val) set will be loaded.
lazy (bool, default True) – If True, the data will not be loaded immediately, instead, it will be loaded on demand.
**reader_kwargs (dict, optional) – Keyword arguments for the database reader class.
- persistence(force_recompute: bool = False, verbose: int = 0) None [source]¶
Save the preprocessed data to disk.