question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Expanding vs sliding window splitter (window splitter with fixed start point)

See original GitHub issue

Is 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

image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
juanitorduzcommented, Jan 5, 2021
1reaction
juanitorduzcommented, Dec 21, 2020

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 🤓 .

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found