After trying to find an example for quite a while, I finally came to ask my question here:
What I have:
I have a temporal sequence of 2d spatial data with 100 cells(or pixels) in longitude and 30 cells latitude direction. This sequence has weekly intervals over a period of approximately 15 years, ending up in roughly 800 time steps. For each time step I have 3 channels, one of them is the numeric target variable I want to predict. For a better understanding I made the following figure:
What I want to do:
I want to predict the target variable for one or more time steps ahead. For the time steps I want to predict, the two other channels are known which means I want to provide them to the model as exogenous input. I want to do a convolution over time and space (as represented by the filter in the figure above). According to my understanding, this would be a 2d convolution on 3d data (first dimension = longitude, second dimension = latitude, third dimension = time)?!?! I want the filter to be at least 52 time steps (= one year) deep as there is a signal delay/lag of up to several months between the target variable and the other channels. The task is quite analogous to feeding videos into a cnn, where I want to make a prediction for one of the rgb channels.
My question is:
- How do I need to structure the data as cnn input? Should it be as a 4d or 5d array?
- (How to implement exogenous input for prediction in keras?)
What I use:
- Keras with tensorflow
- R (preferentially) or Python
Edit: After further research and robobors answer:
I just created a drawing to clarify my understanding of right the data structure I need as input (5d tensor):
Is my understanding of the input shape correct?