I need to estimate the GDP % of a country three years into the future, based on historic data.

I have 30+ years of the following monthly data that includes features such as inflation and unemployment rate:

Year  Month  Inflation  Unemployment %  Other Features  GDP %
1990    1       1.1           6.2           ....         2.3 
1990    2       1.3           6.1           ....         2.4


2019    6       0.8           4.8           ....         3.1
2019    7       0.9           4.9           ....         3.3

Using Random Forests (Python's scikit learn library), I can use the data to calculate the GDP of next month, 2019/8:

Once calculated (let's say GDP % = 3.2) I use this value and rerun the entire Random Forest process, including in the history data the value I obtained for 2019/8.

I continue iterating until I calculate 2022/8, and that is my result.

I have two issues:

  1. It's a tedious process to recalculate everything on each iteration, if the historic data is large then this would take too long.
  2. The 2022/8 result is obtained with just one path, I would need to rerun the overall process N times and take the average to have a more precise number.

I need this to work with machine learning (not necessarily Random Forests), any ideas how to improve/change this process?


2 Answers 2


I think you should consider time series modeling instead of observation based classification models. In the letter, you are propagating error in each prediction year.

I would use ARIMA, LSTMs, maybe semi-supervised models and motif discovery techniques.

  • $\begingroup$ How can I incorporate in ARIMA all the additional features of the model? $\endgroup$
    – ps0604
    Aug 15, 2019 at 19:10

I ended up using Recurrent Neural Networks, it's a good fit with time series.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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