torch_adata._tools._split¶
Module Contents¶
Functions¶
|
|
|
Split dataset length with even proportions according to number of |
|
Split dataset length with specified proportions/number of groups |
|
Split the length of the dataset into proportioned subsets |
|
Split dataset using torch.utils.data.random_split. |
Attributes¶
- torch_adata._tools._split.__module_name__ = _split.py¶
- torch_adata._tools._split.__doc__ = Helper function(s) for splitting the dataset.¶
- torch_adata._tools._split.__author__¶
- torch_adata._tools._split.__email__¶
- torch_adata._tools._split._sum_norm(vals: Union[List, numpy.ndarray]) numpy.ndarray¶
- torch_adata._tools._split.uniform_group_sizes(n_cells: int, n_groups: int = 2)¶
Split dataset length with even proportions according to number of groups and cells.
- torch_adata._tools._split.proportioned_group_sizes(dataset: torch.utils.data.Dataset, percentages: list([float, '...', float]), remainder_idx: int = - 1)¶
Split dataset length with specified proportions/number of groups
- torch_adata._tools._split.calculate_split_lengths(dataset: torch.utils.data.Dataset, n_groups: int = 2, percentages: list([float, '...', float]) = None)¶
Split the length of the dataset into proportioned subsets
- torch_adata._tools._split.split(dataset: torch.utils.data.Dataset, n_groups: int = 2, percentages: list([float, '...', float]) = None)¶
Split dataset using torch.utils.data.random_split.
- dataset
type: torch.utils.data.Dataset
- n_groups
type: int default: 2
- percentages
type: list([float, …, float]) default: None
list([torch.utils.data.Dataset, …, torch.utils.data.Dataset])
Uses the torch.utils.data.random_split function to actually do the split.