Expanding vs sliding window splitter (window splitter with fixed start point)
See original GitHub issueIs your feature request related to a problem? Please describe.
As in real use cases we collect data to enlarge our training set, it would be useful to have an option on the SlidingWindowSplitter
to have fixed start windows for the fold. For example for window_length = 5
, step_length = 1
and fh = 3
here is a representation of the folds:
|-----------------------|
| * * * * * x x x - - - |
| - * * * * * x x x - - |
| - - * * * * * x x x - |
| - - - * * * * * x x x |
* = training fold.
x = test fold.
We could add the option to have the folds of the form:
|-----------------------|
| * * * * * x x x - - - |
| * * * * * * x x x - - |
| * * * * * * * x x x - |
| * * * * * * * * x x x |
Describe the solution you’d like
Just add an option on the SlidingWindowSplitter
class to keep start_fixed
.
Describe alternatives you’ve considered
When this parameter is set to True
we compute the folds as
end = self._get_end(y)
start = self._get_start()
for split_point in range(start, end, step_length):
training_window = np.arange(start, split_point)
test_window = split_point + fh - 1
yield training_window, test_window
Additional context
See fixedWndow
parameter from Caret
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
Expanding vs sliding window splitter (window splitter ... - GitHub
The sliding window splitter predicts only from some recent part of the available training data - this can make sense if there is...
Read more >ExpandingWindowSplitter — sktime documentation
Split time series repeatedly into an growing training set and a fixed-size test set. * = training fold. x = test fold. If...
Read more >Why start using sktime for forecasting? - Towards Data Science
It enables the usage of two methods of splitting the data for cross-validation. They include Expanding Window and Sliding Window. In Expanding ......
Read more >Backtesting: Which is better? Sliding Window or Expanding ...
Which is better? Simplify answer is its depend on your Time Series data. Sliding Window and Expanding Window both have their use cases....
Read more >How To Backtest Machine Learning Models for Time Series ...
All records up to the split point are taken as the training dataset ... Additionally, because a sliding or expanding window is used...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
https://scikit-lego.netlify.app/timegapsplit.html has an interesting approach.
You are right @fkiraly! We should indeed be careful in the distinction between tuning and evaluation! Having an evaluation/monitoring module would be really helpful! For example, I find Prophet’s diagnostics quite handy.
I would be interested in contributing, although my capacity is limited at the moment (baby at home 👶 ). I could support with small bugs/features and also testing module designs 🤓 .