I have a question relate to apply machine learning algorithm to time series data. Because time series data has the impact of "order time or sequence" (I am meaning that time indexing, for example: current sale was impacted by previous sales), so how can machine learning handle the "order/sequence" in time series? I explored the method that transform time series data to supervised learning. But how can we do in case we have many feature (For ex: forecast sale with feature such as sale, promotion, holiday...)?
Asked
Active
Viewed 80 times
1 Answers
0
What one usually does is include lags of variables as regressors. Suppose I want to to predict $y_t$ and I have additional variables $x_t$. Then we could perform a regression of $y_t$ on the variables $x_t, x_{t-1},..., x_{t-p}, y_{t-1},..., y_{t-p}$, for some appropriately chosen $p$. In addition, we can also include time itself as a variable.
Dasherman
- 4,206
-
thank you for your sharing. But I am still concern for multivariate time series. When we have many features, the dimensions of the input will be huge!! Is it correct? Do we have other methods in case the huge dimension ? – Sherry Jul 19 '21 at 10:31
-
In case of a high-dimensional model, you should probably try to reduce the dimension for example through something like PCA or LASSO. You can solve the problem of high-dimensionality in the same way as you would for a usual sample that is not a time series. – Dasherman Jul 19 '21 at 10:55
-
Note that the choice of $p$ is also important in determining the number of features included. You should not choose $p$ too large, because that leads to too many features. – Dasherman Jul 19 '21 at 10:57
-
Thank you so much! one more question that can we find p by using autocorrelation (time series method). What are the methods to find p – Sherry Jul 19 '21 at 11:15
-
You can use (partial) autocorrelation methods, information criteria, cross-validation or other methods that are common for feature selection. – Dasherman Jul 19 '21 at 11:52