How to represent Date Values in ML datasets

Many times we encounter data sets with date values as one of the feature to handle in machine learning problems (e-g historical data of share prices of a company over the period of time, with date as one feature).

One of the way to represent dates in ML datasets is converting it to equivalent numerical representation. I usually convert dates to unix timestamp value to handle better with numerical calculation in ML algorithms.

Excel have a easy way to convert cell value to unix time stamp. Excel stores dates internally as number of days since January 1, 1900.
In order to convert we can use the following formula

=(CellValue-DATE(1970,1,1))*86400

 
0
Kudos
 
0
Kudos

Now read this

Story of Aaron, chasing a startup dream in epic style

Recently, Apple acquired a start-up called “BookLamp.com” for approximately $15 million US dollars. It was an usual news for many, as big companies frequently buys small start ups to strengthen their competitive advantage. But this news... Continue →