Time stamp as input variable for regression (feature extraction)



I am working on web logs and have a time-stamp variable in the format dd-mm-yyyy hh-mm-ss.

I have earlier worked on date variable and found that best way to extract feature from date is to create dummy variables based on day-of-week month-of-the-year etc. Not sure how to deal with hourly data, and for that matter time-stamp data.

Any idea how to extract feature or usable information from time-stamp for predicting sales?


Hi @azimulh,

Here is one suggestion: If the web logs pertain to an e-commerce site then time of the day becomes quite important to predict sales. So you can create 1 hour bins to indicate 0-1,1-2,2-3 etc. Basically convert the continuous time data into discrete categorical data and then apply the appropriate prediction algorithm.



I was thinking on the same lines, but thought if someone has a different solution. Thanks for your help.