LSTM for time series prediction

#1

Hi,

I am trying to do a time series prediction using a long short term memory (LSTM) network. Knime has a deep learning node known as DL4J for regression (see image below), but I would like to know if there is any other way that I can do a time series prediction using an LSTM network. I tried inserting an LSTM layer in the workflow but it didn’t work.

The examples that I found in Knime for LSTM are used for word prediction. I appreciate if someone can help me with this. Thanks.

image

0 Likes

#2

Hi @Nafeeza86,

Our DL4J integration does not support LSTMs, unfortunately. Instead, I would suggest to have a look at the Keras integration which offers a wider range of layers, including RNNs and LSTMs. The example workflows you mentioned should also employ these Keras nodes. The examples are indeed largely text-processing related but I also found this workflow which performs time-series based demand forecasting. Maybe this will help you.

Note that Keras is Python-based, that means before you can actually use the Keras nodes, you first need to set up a suitable local Python environment. See here to learn how to do this.

Marcel

5 Likes

#3

Here’s one more slightly smaller scale example.
It uses a Keras LSTM network to forecast energy usage.

Best of luck with your project!

4 Likes

#4

Hi,

I have some questions about the workflow you provided as an example.

  1. Is there a way of dividing the dataset into training and testing set. I don’t see that this workflow has a test set. If so, will I have to add any other nodes that connect to the test set.
  2. What does the Deployment loop node exactly do? Also, I cannot find it in my node repository.

Thanks.

0 Likes

#5

Sorry for the slow response,

The deployment loop is actually a component, it contains other nodes kind of like a metanode.

You can right click on it and go to component > open, or hold control and double click to open it and see the nodes inside.

As to the splitting of the data, the partitioning node that sends some data to the Keras learner and some data to the deployment loop is creating train and test sets.

2 Likes