def splitset(num_trials, skipstep=None):
    split = num_trials // 2

    a = list(range(0, split))
    b = list(range(split, num_trials))
    yield a, b
    yield b, a
Split-set cross validation
dataset/ETHPy150Open scot-dev/scot/scot/xvschema.py/splitset