TimeSliceCrossValidator.split#
- TimeSliceCrossValidator.split(X, y)[source]#
Yield (train_idx, test_idx) pairs for each time-slice split.
This implementation selects rows by date masks so that all coordinate levels (e.g. multiple geos) for the selected date ranges are included in each fold. It returns integer positions suitable for use with
DataFrame.iloc.