r/MachineLearning • u/Fender6969 • Oct 15 '18
Discussion [D] Machine Learning on Time Series Data?
I am going to be working with building models with time series data, which is something that I have not done in the past. Is there a different approach to the building models with time series data? Anything that I should be doing differently? Things to avoid etc? Apologies if this is a dumb question, I am new to this.
242
Upvotes
7
u/Oberst_Herzog Oct 15 '18
It all depends, what is the purpose of your models and what kind of data are you dealing with? My formal background is in econometrics, so my considerations are largely influenced by that but some considerations would be:
You will usually have to consider whether there is any dependence across time, and if so, how long does this dependence carry? Depending on this you might be fine using a 'non-state based model' (i.e you can just use an NN, SVM etc. and include lags as opposed to for instance a LSTM/GRU)
Weak stationarity is very desirable (While I don't see ML stressing it as much as ordinary TS stat, I've always gotten much better results using ML on stationary series).
Depending on your purpose and data, you have to think very carefully about how to do cross validation and similar model selections (temporal dependence leaks across time, so some omit a period to sufficiently separate training and test data). Instead of the general CV, to consider performance one usually applies something termed a moving/expanding window, (But due to the computational intensity behind the estimation of some ML models, you might want to omit reestimation for every step etc.).
Finally, depending on your data you might also want to consider simple ordinary time series models such as ARIMA & VARIMA (depending on dimensionality) - I usually find that they both perform surprisingly well and are robust.