Keras LSTM input data

Hello,

I would like to know how to add static features (input data that does not change over time) to the multivariate time series data (input feature vectors from several time steps) in a same many-to-one recurrent neural network (LSTM) in Keras.

Thank you.

Hi @datascience100,

I think the easiest way it to add them during the preprocessing. For example add them as static columns with the Constant Value Column node before you start creating the overlapping sequences with the Lag Column node.

Please let me know in case of any further questions :slight_smile:

Cheers
Kathrin
PS: You might find the following blog post and example workflow on multivariate time series helpful.

2 Likes

Thank you.
And regarding the LSTM Keras network structure: do you recommend to add these constant-value features to the same input layer node to be part of the sequence being processed by the same LSTM layer node, or otherwise to be out of the time sequence and join the Keras network by a different input layer that does not go through the LSTM layer node?

I would probably try out both and see what works better :slight_smile:

It sounds like an interesting project you are working on. Can you tell a bit more about the use case?

Please let me know in case of any questions when implementing either of your ideas.

Kathrin

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.