qumphy.data.sleepapnea module

File: qumphy/data/signal_preprocessing/noise.py Project: 22HLT01 QUMPHY Contact: oskar.pfeffer@ptb.de Gitlab: https://gitlab.com/qumphy Description: Functions handling SleepApnea data.

class qumphy.data.sleepapnea.SleepApneaDataModule(sampling_rate, batch_size, num_workers, pin_memory=True, prefetch_factor=8, **dskwargs)[source]

Bases: LightningDataModule

LightningDataModule implementation for the SleepApnea dataset.

setup(stage=None)[source]
test_dataloader()[source]
train_dataloader()[source]
val_dataloader()[source]
class qumphy.data.sleepapnea.SleepApneaDataset(data_directory, split, normalize=False, dtype=torch.float32, data_fraction=1.0, filter_params=None, noise_params=None, input_sampling_rate=None, split_to_input_sampling_rate=None, target_sampling_rate=None)[source]

Bases: Dataset

SleepApnea dataset class.

get_data()[source]
get_labels()[source]
normalize_data(data)[source]

Rescales the data to the range [-1, 1].

Parameters:

(array) (data)

Returns:

array: The normalized data in the range [-1, 1].

split_to_data_key = {'test_ID': 'signalsTest_ID', 'test_OOD': 'signalsTest_OOD', 'train': 'signalsTrain', 'val': 'signalsValidation'}
split_to_label_key = {'test_ID': 'labelsTest_ID', 'test_OOD': 'labelsTest_OOD', 'train': 'labelsTrain', 'val': 'labelsValidation'}