tapas.datasets.utils.index_split
- tapas.datasets.utils.index_split(max_index, split_size, num_splits)
Generate training indices without replacement. If max_index is smaller than is necessary to generate all splits without replacement, then multiple sets of indices will be generated, each without replacement. Logic is not currently implemented to ensure each index is in maximally many index splits. :param max_index: Max index (size of dataset to split) :type max_index: int :param split_size: Number of indices per split :type split_size: int :param num_splits: Number of splits to make :type num_splits: int
- Returns
List of numpy arrays of indices.
- Return type
indices (List[np.ndarray])