nifreeze.data.splitting module¶
Data splitting helpers.
- nifreeze.data.splitting.lovo_split(dataset: BaseDataset, index: int) tuple[Any, Any] [source]¶
Produce one fold of LOVO (leave-one-volume-out).
- Parameters:
dataset (
nifreeze.data.base.BaseDataset
) – Dataset object.index (
int
) – Index of the volume to be left out in this fold.
- Returns:
A tuple of two elements, the first element being the components of the train data (including the data themselves and other metadata such as gradients for dMRI, or frame times for PET), and the second element being the test data.
- Return type: