datasets.mimic package
Submodules
datasets.mimic.get_data module
Implements dataloaders for generic MIMIC tasks.
- datasets.mimic.get_data.get_dataloader(task, batch_size=40, num_workers=1, train_shuffle=True, imputed_path='im.pk', flatten_time_series=False, tabular_robust=True, timeseries_robust=True)
Get dataloaders for MIMIC dataset.
- Parameters:
task (int) – Integer between -1 and 19 inclusive, -1 means mortality task, 0-19 means icd9 task.
batch_size (int, optional) – Batch size. Defaults to 40.
num_workers (int, optional) – Number of workers to load data in. Defaults to 1.
train_shuffle (bool, optional) – Whether to shuffle training data or not. Defaults to True.
imputed_path (str, optional) – Datafile location. Defaults to ‘im.pk’.
flatten_time_series (bool, optional) – Whether to flatten time series data or not. Defaults to False.
tabular_robust (bool, optional) – Whether to apply tabular robustness as dataset augmentation or not. Defaults to True.
timeseries_robust (bool, optional) – Whether to apply timeseries robustness noises as dataset augmentation or not. Defaults to True.
- Returns:
Tuple of training dataloader, validation dataloader, and test dataloader
- Return type:
tuple
datasets.mimic.multitask module
Implements data loaders for the multitask formulation of MIMIC.
- datasets.mimic.multitask.get_dataloader(batch_size=40, num_workers=1, train_shuffle=True, imputed_path='im.pk', flatten_time_series=False)
Generate dataloader for multi-task setup, using only tasks -1 and 7.
- Parameters:
batch_size (int, optional) – Batch size. Defaults to 40.
num_workers (int, optional) – Number of workers to load data in. Defaults to 1.
train_shuffle (bool, optional) – Whether to shuffle training data or not. Defaults to True.
imputed_path (str, optional) – Datafile location. Defaults to ‘im.pk’.
flatten_time_series (bool, optional) – Whether to flatten time series data or not. Defaults to False.
- Returns:
Tuple of training dataloader, validation dataloader, and test dataloader.
- Return type:
tupe