# What is the preferred approach for this problem?

I have the Data of 10,000 users Time Session in a website/App, The Login time, logout time, the person activity,

The Data is available for 60 days ( per user )

Using this 60 days data for 10k users, can I predict the active time of the respective user on 61st day? if yes what is the best approach and please suggest which type of problems I can refer to solve this

Thank you

• What do you want to do with that information? Knowing how the prediction will be used may help people give you good advice. Apr 15, 2020 at 15:45
• What you have is a regression problem. That gives you two options depending on the data => time-series model or an ML model. I'd go with an ML model Apr 15, 2020 at 19:52
• are there 10K distinct user ? (I assume no) - how many users (different user_id) do you have ? May 28, 2021 at 11:47
• I would go in the clustering domain to see if you cannot group the different data Jun 22, 2023 at 15:06

Convert your training data to the following format -

a = login_time
b = logout_time
c = person_activity
train_data_X = [
[[a, b, c], [a, b, c], ......, [a, b, c]]
[[a, b, c], [a, b, c], ......, [a, b, c]]
.
.
.
[[a, b, c], [a, b, c], ......, [a, b, c]]
]

train_data_Y = [
[[time_day_1], [time_day_2], ...... [time_day_60]]
.
.
.
[[time_day_1], [time_day_2], ...... [time_day_60]]
]


Explaination -

You Input(training_data_X) data has shape 10000 * 60 * 3 because you have 10K users, data for 60 days and each data point depends on 3 variables namely a, b and c. Your Target(training_data_Y) data has shape 10000 * 60 * 1 because you have just one number to output i.e active time.

Now, this is a Regression Problem because you are trying to predict a continuous value i.e active time.

You can model this type of problem with a number of time-series models. But since you got a multivariate input, i.e [a, b, c](refer training_data_X). You would be benefitted a lot using a Seq2Seq model to generate your time-series. If just want to generate 61st time-step you could use it just for that as well.

Specific details and implementation

• you don't have user_id - do you ? then how does the model learn about each user_id activities ? May 28, 2021 at 11:45
• The first dimention i.e the 10000 rows or in this case matrices are your users. Assign any id to them. May 30, 2021 at 22:01
• 1) I don't see any user here -> a = login_time b = logout_time c = person_activity - yes, these are user information but do not specify which user - even if they are user_id, how does that gonna look after all those numerical transformation ? - 2) the link you have added at the end, is not repeated measurement - every household is in one row - in this question one user is not necessarily one row May 31, 2021 at 7:34
• 1st row is first user. 2nd row is second user. Like sentences words and characters. Jun 1, 2021 at 8:17
• Only difference between the link I posted and the problem here is I additionally suggested dividing it day wise adding one more dimension to the "user" row Jun 1, 2021 at 8:18