I am trying to build an efficient forecasting model to predict sales in the future. I managed to obtain a first pretty solid model using a LSTM network. However, it wasn't sensible enough to large occuring variations.

I then decided to process the problem in a different way by fitting a linear regression over the data, which displays a clear trend. The linear regression was accurate at predicting the trend but not the variations. I then fitted an Random Forest which was accurately predicting the variations but wasn't sensible to the trend: the prediction were following a seemingly stable mean along the time but were way under the effective sales.

Is there any way I can adjust the bias of my Random Forest in order for it to take into account the forecasted trend by the Linear regression ? Is there any other method not involving the bias ?

I already tried training the Random Forest using residuals but this method wasn't successful, only lifting the extra trees plot insignificantly.

Thanks in advance !

  • $\begingroup$ If this is time series data why not use time series models, ex. ARIMA? $\endgroup$ – user2974951 Aug 6 '19 at 5:58
  • $\begingroup$ The company I work in has a list of available models to use. Unfortunately, ARIMA isn't one of them. $\endgroup$ – naifmeh Aug 6 '19 at 19:26

I would not suggest you use a RF for time-series data, it is not meant for it, and it probably won't work well. First of all, RF uses bootstrapping for creating bootstrapped samples for each tree, which completely destroys the correlation structure in the data. Second it is not really good for linear data.

I would suggest you try to improve your linear model, if you cannot get access to other models. A linear model with a linear trend, a seasonal trend, and maybe something else too like lags of variables. All these can be included with the right term, no special model needed.

| cite | improve this answer | |
  • $\begingroup$ Thanks for the answer, but actually the question isn't wether I should be using a RF or no. The question is how to actually center the RF predictions around the trend. As I stated above, the company I work in restricts the available models and the RF is able to perform good predictions. The predictions would be better if they were centered around the trend. $\endgroup$ – naifmeh Aug 8 '19 at 18:31
  • $\begingroup$ @naifmeh But you also stated that you used linear models. If so, you should try to use and improve them with my suggestions, they are better suited for this task. You could maybe try to improve your RF, but this is unnecessarily complicated. $\endgroup$ – user2974951 Aug 9 '19 at 5:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.