简体   繁体   中英

Machine Learning predictions using dates

So I created a machine learning model to make predictions on future output at work. So far its 97% accurate.

I wanted to predict the output using the date along with 2 other inputs and since you can't use datetime directly in regression models.

I converted the date column using ordinal encoding, will I then be able to use the date as an input then?

Or is there a better method?

Ordinal encoding is't the best approach for handling date/time data, if in your data occurs seasonality or trends. Depending on your problem, you could extract a lot of different features from dates, eq:

  • year, month, day....
  • hour, minute, second....
  • day of week
  • season
  • holiday
  • etc...

What should you use exactly highly depends on your problem, you should first investigate your data, maybe plot your predicted variable against dates and search for patterns which can help you then achieve best prediction results.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM