What is the best model to predict Date type

720 views Asked by At

I have a set of data. The prediction is to be done to Data type. I am using Weka for the model. (like yyyy-MM-dd HH:mm:ss) What is the best way to use? I used many available ones but all give high error in my training data. Please kindly help me with this

1

There are 1 answers

0
Ivan Mushketyk On

The problem that you have is probably because Weka considers each date as it's own class which won't work for obvious reasons.

To solve this problem at first you should convert to a known one. Instead of trying to predict a date, try to predict an offset in days/months/years. Say if you need to predict at what day during the next year some event will happen instead of making a prediction like 11-08-2016, convert it to number of days since beginning of the year. Or if all events that you are trying to predict will happen since 2016 (and may happen during the next few years) try to predict number of days since 01-01-2016.

You can chose one of so called "regression analysis" algorithms that predict a number from a feature vector. I would suggest to try linear regression algorithm first, since it's fast and less likely to overfit your data, but you can also consider other algorithms like neural networks.

Beware that if you your feature vector contains dates, you should convert them to relative values first, since absolute date like (08-10-2014) would probably be considered as a nominal value by Weka and won't help to increase accuracy of the model, while such relative values as "age in years" or "time since last doctor visit" can be effectively used for prediction.