Perform k-fold split of data with
nrows rows into
subsets. The dataset itself is not passed to this function:
it is sufficient to know only the number of rows in order to decide
how the data should be split.
[0; nrows) is split into
nsplits approximately equal parts,
i.e. folds, and then each
i-th split will use the
i-th fold as a
test part, and all the remaining rows as the train part. Thus,
i-th split is
[0; i*nrows/nsplits) + [(i+1)*nrows/nsplits; nrows);
where integer division is assumed.
The number of rows in the frame that is going to be split.
Number of folds, must be at least
2, but not larger than
This function returns a list of
where each component of the tuple is a rows selector that can be applied
to any frame with
nrows rows to select the desired folds.
Some of these row selectors will be simple python ranges,
others will be single-column Frame objects.