TransWikia.com

Sliding window approach using SVR & LightGBM

Data Science Asked by dragan zrilic on December 17, 2020

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?

One Answer

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?

Answered by RonsenbergVI on December 17, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP