chainer.datasets.get_cross_validation_datasets¶
-
chainer.datasets.
get_cross_validation_datasets
(dataset, n_fold, order=None)[source]¶ Creates a set of training/test splits for cross validation.
This function generates
n_fold
splits 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).Parameters: - 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.
Returns: List of dataset splits.
Return type: list of tuples