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

Duplicate Content Checking

I wrote this simple utility in C# to check any given document is already published anywhere in the internet or not. This application is needed for one of my friend, he runs a information portal site, and got many freelance writers for... Continue →