I am using Keras to do a machine learning task:
Let's say I want to predict the time that a user spends on a product page. Each training case is a partial user visit session. One single user may have multiple sessions. The lengths of sessions are variable.
The figure shows a user session.
Xn is the feature vector of the
nth product page, while
yn is the user's reading time on the product page. Given the previous time steps, I want to predict the time that the user will spend on the current page.
For example, in the test dataset, given
y1, I want to predict
y2. Then after observing actual
y2, I then predict
y3. The key here is that this is like an online prediction: At t=3, the actual
y2 is already observed. So the observed values, not the predicted ones, are used to predict
Given this tutorial, I am not sure whether my case should be 'many to one' or 'many to many'.
If 'many to one', there is nowhere to put
y2. I think
y2 should be able to partially determine
y3. It is possible to add
y2 as one input feature in
X2. But there is no way to build
y3 is the prediction.
Onthe other hand, for 'many to many', I do not need the prediction of y1 and y2 because they should be known when predicting