0
$\begingroup$

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?

$\endgroup$

1 Answer 1

0
$\begingroup$

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?

$\endgroup$
1
  • $\begingroup$ The implementation of a sliding window isn't the problem. I'm asking if it's possible to feed the dataset as a windowed dataset. For my TF model I've used CNN & LSTM which both accept a 3 dimensional dataset [samples, timestemps, features]. Whereas SVM & lightGBM accept only 2D data as input. I haven't tried to tune the window sizes parameter. Will try it. $\endgroup$
    – zrilman
    Sep 5, 2019 at 21:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.