I've read in a few articles where it was talked about using CART for timeseries forecasting and anomaly detection. However, I would want to remove the Seasonal and Trend noise in my temporal data. I've seen people using STL decomposition to this and use the residual data for any processing.Going by this approach, I's assume this residual data (for every feature) would become the input features to the CART. While this is the case, how can I use the CART for forecasting? How can I STL decompose a single data point (based on what data I have) and then feed the residue to the CART for prediction. Do I have to STL decompose the entire dataset again? That looks to be a fundamentally flawed approach to me. Am I trying to use two mutually exclusive techniques and feed one to another? Need some advice.
STL decompose your historical time series. This will give you a Seasonal, a Trend and a Remainder component.
Forecast the Seasonal component. By construction, this is a periodic series, so the only useful forecast is the Seasonal Naive one; that is, take the Seasonal component entry corresponding to the period you want to forecast.
Forecast the Trend component. This is a series with a nonconstant trend. You will need to pick a method for forecasting it. A good choice is trended exponential smoothing.
Model the Remainder component, by feeding it into your CART, along with any time-varying explanatory variables.
Forecast the Remainder component from your CART model, by feeding in the future values of the explanatory variables.
Add up the three forecasts.