MultiomeLoader-checkpoint

Module Contents

Classes

MultiOmicsDataset

An abstract class representing a Dataset.

class MultiomeLoader-checkpoint.MultiOmicsDataset(input_data, sample_names=None, side_data=None, normalization_factors=None, model_matrix=None, initialization_input=None, to_tensor=None, use_cuda=False, load_on_cuda=None, transform=None, transform_side=None, transform_aux=None)

Bases: torch.utils.data.Dataset

An abstract class representing a Dataset.

All datasets that represent a map from keys to data samples should subclass it. All subclasses should overwrite __getitem__(), supporting fetching a data sample for a given key. Subclasses could also optionally overwrite __len__(), which is expected to return the size of the dataset by many Sampler implementations and the default options of DataLoader.

Note

DataLoader by default constructs a index sampler that yields integral indices. To make it work with a map-style dataset with non-integral indices/keys, a custom sampler must be provided.

__len__()
__getitem__(idx)