Keras Time Series Prediction

Hi All,

I am after some assistance on using Keras for time series prediction. There is a really good example by Kathrin at the link below however i want to progress this further.

The adjustments i want to make are:-

  1. Use multiple data sets for training. Using the bicycle dataset as an example, what if i had datasets for multiple locations eg 10 different locations with an additional column called “location” integers 1 through 10 in the dataset
  2. What if instead of predicting the next hour i wanted to predict the next 20 hours.

Has anyone done anything like this before? I am having trouble finding any documentation on the Keras nodes except for Katrhin’s work, which is exceptionally helpful.

Any help would be appreciated. I am new to Knime so apologies if this is the wrong area to post.

Hi @JohnHuston22,

please find below my thoughts about your planned adjustments.

  1. In this case I would first create the training sequences for each location. Afterwards you have different options how you can use the location information in your network.
    Option 1: You add a second input for the location to your network architecture and you don’t use this information in the RNN Layer, but you add it to the output of the RNN Layer with the Keras Concatenate Layer and use it by the followed layers.
    Option 2: You add the location as additional value in the input vector at each time step.

  2. If you are interested in predicting more that one value in the future you can use a recursive loop in KNIME Analytics Platform. The Deployment Loop Component in this workflow shows you an example for univariate time series predictions.
    Energy Demand Prediction with LSTM - Deployment – KNIME Hub
    Note: To execute this workflow you need to download the following workflow group:
    kathrin/Codeless Deep Learning with KNIME – Chapter 6 – KNIME Hub
    The problem in case of multivariate time series prediction is that you need also the values of all the input features in the future, which might not be available. In this case you can either change the network to predict also the values of the input features or you change the training data and architecture to learn to predict the next 20 values based on the input.