In a dataset, the data are the average of vehicles speed in the points (cells) of a map. I am trying to build a prediction model.

While the inputs are the average of vehicles speed of all points in recent 40 min and the outputs are the next 10 min of all points.

If there were 320 points on the map, the input shape = (320,20) and the output shape =(320,5). The averages of vehicles speed are collected each 2 min in all points.

There are several such samples (n samples, x=(n,320,20), y=(n,320,5)).

The code of the final architecture of my model:

model = models.Sequential()
model.add(Conv2D(256,(3, 3),
         input_shape=(320,20,1), padding='same'))
model.add(MaxPooling2D((2, 2)))

model.add(Conv2D(128, (3, 3), activation='relu', padding='same'))
model.add(MaxPooling2D((2, 2)))

model.add(Conv2D(64, (3, 3), activation='relu', padding='same'))



There is a significant weekly cycle and I would like to import the same interval of the previous week together with the current input to the model.

How should I change the model?

Should I change the input shape to (n, 320, 2 * 20)? adding additional average speeds from previous week.

  • 1
    $\begingroup$ Shouldn't your input from the previous week be the same size as the output? i.e. the same time interval as you are trying to predict? So your input would be in the shape of (n, 320,25). $\endgroup$ – Mark.F Dec 4 '18 at 9:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.