Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH] Introduction of ExpandingCutoffSplitter #6359

Open
ninedigits opened this issue Apr 28, 2024 · 2 comments
Open

[ENH] Introduction of ExpandingCutoffSplitter #6359

ninedigits opened this issue Apr 28, 2024 · 2 comments
Labels
enhancement Adding new functionality feature request New feature or request module:splitters&resamplers data splitters and resamplers

Comments

@ninedigits
Copy link
Contributor

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

@ninedigits ninedigits added the enhancement Adding new functionality label Apr 28, 2024
ninedigits pushed a commit to ninedigits/sktime that referenced this issue Apr 28, 2024
@fkiraly fkiraly added feature request New feature or request module:splitters&resamplers data splitters and resamplers labels Apr 28, 2024
@fkiraly
Copy link
Collaborator

fkiraly commented Apr 28, 2024

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

@ninedigits
Copy link
Contributor Author

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.

fkiraly pushed a commit that referenced this issue May 20, 2024
#### Reference Issues/PRs

#6327
#6359

#### What does this implement/fix? Explain your changes.

This PR introduces a new splitter, `ExpandingCutoffSplitter`, to the
time series forecasting module of sktime. This splitter starts with an
initial training window based on a specified cutoff point and expands
incrementally in each split. This feature addresses the need for a
dynamic adjustment of the training window in time series forecasting
based on a cutoff date, especially in cases where many different time
series will be tested on common cutoff dates but otherwise have
different starting points.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Adding new functionality feature request New feature or request module:splitters&resamplers data splitters and resamplers
Projects
None yet
Development

No branches or pull requests

2 participants