0
$\begingroup$

Suppose I have a data frame with 2 columns, which are sales and promotions. I want to predict the next day sales based on the past sales and promotion info of 3 days, plus the promotion to be applied at the next day? How do I process and reshape the dataframe? I mean if only previous promotions need to be considered, then, after some shifting, the data frame could be reshaped into (sample size, 3, 2), but it becomes a problem if I also need to consider the promotion at the next day. It is a pretty common issue, does anyone has any thought about this?

$\endgroup$

1 Answer 1

0
$\begingroup$

Have a look at this question. There is a nice discussion about how to implement this. The idea in to create a separated Input to your model and concatenate it AFTER the recurrent layer(s). Also in the Keras documentation, there is an example on how to build such models with a few lines of code.

$\endgroup$
1
  • $\begingroup$ Thanks! so, it is like building a new NN using the output from the existing NN $\endgroup$
    – Aaron_Geng
    Commented Mar 13, 2018 at 18:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.