sktime / sktime

A unified framework for machine learning with time series

Home Page:https://www.sktime.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[ENH] Introduction of `ExpandingCutoffSplitter`

ninedigits opened this issue · comments

Is your feature request related to a problem? Please describe.

Currently, time series forecasting challenges often involve dynamically adjusting the training window to capture more data as time progresses. While current time series splitters offer sliding windows and expanding windows that move or grow across a time series, and cutoff splitters that employ a fixed window from a cutoff point or date, there is a gap in functionality. What's missing is a splitter that can start with an initial window defined by a cutoff point and then expand this window for subsequent splits. The current tools lack the ability to adjust the training window starting from a specific point in time and growing it incrementally, which can be critical for capturing evolving patterns in time series data as more information becomes available.

Describe the solution you'd like

I propose the introduction of the ExpandingCutoffSplitter, a new splitter class that combines elements of the ExpandingWindowSplitter and CutoffSplitter. This splitter would allow the training window to start from a specific cutoff point and expand incrementally in each subsequent split.

Describe alternatives you've considered

I considered using ExpandingWindowSplitter and back calculating the initial window size by determining the number of periods between the first date in the time series and the desired cutoff date. This alternative would involve dynamically adjusting the initial_window of the ExpandingWindowSplitter based on the cutoff date, essentially customizing its behavior for each forecast. However, this approach limits use with other tools within sktime’s repository, such as when forecasting many time series using ForecastByLevel, each with a different starting point.

Additional context

As mentioned above, the implementation of ExpandingCutoffSplitter would be particularly useful in scenarios where the model is forecasting many time series, each with a different starting point, with the goal of testing on the same cutoff dates, then expanding that window and so forth. This feature can enhance the forecasting framework's flexibility and applicability to a broader range of real-world scenarios.

Reference: #6327

Quick question, would you like to work on this yourself, or should we mark it a good first issue?

I already coded up a solution, was about it to submit but it looks like some of my commits from the last branch got included.