im novice in data science field, i have a problem statement: to predict which users will come online the next day.

i have two datasets of the user:

1st dataset of the user ( master table ) which has the overal information of the user:

uid totlike totview totshare last_social_activity   last_service_activity   last_active_date    most_active_day   is_active( True if(last_active_day - present date )< 30 )
1   200     500     115      like                   see_news_feed           11/12/2017           Monday             TRUE
2   300     600     2223     share                  see_dashboard           11/13/2017           Monday             TRUE
4   500     237     311      comment                see_news_feed           11/14/2016           Wednesday          FALSE
  • totlike - total like
  • totview - total view
  • totshare- total share

2nd data set of the user ( everyday activity ): Historical Data of user activity with time stamp.

date       uid  total_like  total_view  total_share last_social_activity    last_service_activity
11/4/2016   1     10        20         1            like                        see_news_feed
11/4/2016   2      9        25         2            share                       see_dashboard
11/4/2016   4      1        23         3            comment                     see_news_feed
11/4/2016   3      3        14         4            like                        see_dashboard
11/8/2016   1      4        14         5            comment                     see_news_feed

what is the right way to predict if the user will come tomrrow?


2 Answers 2


I think that you should stop thinking about modeling and instead start thinking about the meta datasets that you can draw from what you already have. I have also downvoted the previous answer you received because it's making the same mistake.

One of the most consistent mistakes I see in data science (by all levels of scientists) is that they skip the data transform/wrangling stage and just go straight into modeling. That's a MASSIVE mistake and the answer you seek starts well within this stage.

So, I want you to take a step back and think about your data. What do you need to know about a user? What are some of the features of each user? What are the features of when they visited? What day? What time? Was it the morning or the afternoon? How many days in a row was it? What is the gender of the user? And so on and so on.

Your goal is to create a dataset that has one line per user and the same features for all users. From there, you'll be in a better position to make better decisions about modeling and anything else you want to know about your data.


Basically you cannot.

What you may do is to know the total number of users that will connect.

You can to forecast the next connection, by making assumption on the distribution of the time between two connection if a given user. For example, if the rate of connection is constant, then the time between connection obeys to an exponential law $$p(x) = \frac 1 \lambda e^{-\lambda t}, \text{ if } x>0; p(x)=0 \text{ if } x<0$$ where $\lambda$ is the mean time between connection, which is easy to compute.

Curiously enough, the best forecast (the value with a maximum probability) is today ($x=0$). Or tomorrow ($x=1$) if you make your forecast just before mid-night.

You can try a Weilbull model, but I smell you will also get correct but unpractical results.

  • $\begingroup$ so what kind of data will help me predict ? you can tell me in general terms!! $\endgroup$ Jun 28, 2018 at 11:04
  • $\begingroup$ No data may help you. In facts, if it were possible you d'have the appropriate data. To forecast that a (any) user will connect tomorrow is easy. To forecast that this user is Siram (or uid=4) is not possible with a practical accuracy (you'll be wrong more often than right). Just like in software: it's easy to forecast that a buggy program will fail. It is hard to say that it will fail on line 1023. $\endgroup$
    – AlainD
    Jun 28, 2018 at 13:32
  • $\begingroup$ so can i at least predict if the user will churn or not? or do survival analysis? even tho the model wouldnt tell me when the user will leave.. $\endgroup$ Jun 29, 2018 at 9:33
  • 1
    $\begingroup$ That's a dreadfully wrong answer. Suppose all my visitors have visited every day for the past 262 days? I'm pretty sure I can predict if one of them is going to visit tomorrow. I'll say they all will. 100% accuracy. You seem to assume independent visits, which is possibly not true, and with no help from the covariates - it might be that because maybe this is a sports site, everyone logs in on match days, so you can predict with high confidence that Fred will log in on a match day. "No data may help you" seems like nonsense. $\endgroup$
    – Spacedman
    Aug 31, 2018 at 15:22
  • 1
    $\begingroup$ I agree with @Spacedman The feeling of "no data may help you" is clearly wrong and only exists here because there has been no discussion on data transforms/wrangling. Your initial dataset is just that, your initial set. That doesn't mean that all the answers lie within - there is still some work you need to do to create a meta dataset that contains any number of features. Then, and only then, will you be ready for a discussion on modeling. $\endgroup$ Oct 30, 2018 at 14:34

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.