timebasedcv icon indicating copy to clipboard operation
timebasedcv copied to clipboard

Take top N splits

Open FBruzzesi opened this issue 1 year ago • 0 comments

Description

In #41 we are discussing the possibility of starting with the most recent data. While doing so, also the request of taking only N splits emerged.

This should be easy to accomplish via a helper function along the following lines:

from itertools import islice

def take_n_splits(CV, N):
    yield from islice(CV.split(), N)

FBruzzesi avatar May 10 '24 18:05 FBruzzesi