get_cross_validation_datasets(dataset, n_fold, order=None)¶
Creates a set of training/test splits for cross validation.
This function generates
n_foldsplits of the given dataset. The first part of each split corresponds to the training dataset, while the second part to the test dataset. No pairs of test datasets share any examples, and all test datasets together cover the whole base dataset. Each test dataset contains almost same number of examples (the numbers may differ up to 1).
- dataset – Dataset to split.
- n_fold (int) – Number of splits for cross validation.
- order (sequence of ints) – Order of indexes with which each split is
determined. If it is
None, then no permutation is used.
List of dataset splits.
list of tuples