if you have a time series and you want to do some predictions, what time feature should you use ?

lets say we are trying to predict how many people visit a certain website, we have data for the visits for the last 2 years, what should we include as a time feature ? and if we use more features might it make our model less accurate ?

the features i can think of are the following:

Date index(1-700)
Week number (1-53)
Day of the week (1-7)
Day of the month(1-31)
Day of the year(1-365)

1 Answer 1


If you use Week number (1-53) and Day of the year(1-365) in the same model, you will have collinearity. You can derive the week number from the day of the year, so the former doesn't add any additional information.

This answer explains it in more detail.

  • $\begingroup$ Yes however, i don't have SO many features and have way more samples then features, so this shouldn't be a cause that decrease the accuracy of my model. As for the Date index is it so important to use it ? $\endgroup$
    – AnarKi
    Jun 12, 2014 at 9:43
  • $\begingroup$ Are you trying to predict the number of visits in a given day? Which algorithm are you using for prediction? Date Index (t) relates an observation taken at t to t-1 or t+1, etc. It is your temporal reference point. I guess its importance would rely on the model you wish to use. $\endgroup$
    – Zhubarb
    Jun 12, 2014 at 9:51
  • $\begingroup$ exactly number of visits in a given day, i try to predict the next 10 days, sometimes more or less $\endgroup$
    – AnarKi
    Jun 12, 2014 at 10:19
  • 1
    $\begingroup$ "...i try to predict the next 10 days", so you would need the date index. $\endgroup$
    – Zhubarb
    Jun 12, 2014 at 10:24

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.