Sliding window approach using SVR & LightGBM

I'm working on a multivariate time series forecast using a couple of ML algorithms (Neural Networks, Support Vector Machines Gradient boosting algorithms). I need to measure the performance of each model. I've implemented the 1st model using Tensorflow 2.0. Training testing data was created using tf.Dataset API. The data format is (window_data, forecast), where window_data represents a set of 24 timesteps and forecast represents the next timestep.

Now I need to train 2nd 3rd model using SVR (LinearSVR to be more precise) and LightGBM. Is it possible to feed the model with a windowed dataset like in my 1st model?

Topic lightgbm forecast neural-network svm time-series

Category Data Science


Tensorflow is designed to really make your life easier (especially with the fancy new additions with the 2.0 version). I think you should use pandas to generate sliding windows: I would think that for a N sized time series with K lookback window you will have N-K+1 examples by sliding lookback.

And while you're at it have you treated your lookback window as a hyperparameter? i.e optimise your model performance on a validation test by searching the best lookback?

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.