What can machine learning add to economics?
July 31, 2017
Machine learning and artificial intelligence (AI) are some of the hottest topics around today. On the one hand, AI promises great benefits for productivity and the economy, on the other hand it could also displace some existing jobs at the same time as it creates new ones.
But what can AI add to economics? We have recently used machine learning to create a “nowcasting” model capable of predicting the direction of change of quarterly GDP growth around 95% of the time over the past five years (see chart below). This test is based on information available several weeks before the ONS publishes its first official estimate of GDP growth each quarter.
More generally, machine learning is slowly gaining traction among economists, but there is still a lack of information about what exactly machine learning entails, what makes the modelling approach different to classical econometrics, and how economists (and businesses) can make best use of it.
- Prediction vs. causal inference
A good starting point here is that machine learning is focused on maximising predictive power. Of course, standard econometric models can also produce decent forecasts at times, but they are really better suited to understanding causal relationships between different aspects of the economy (e.g. if I adjust a key tax rate, what does it do to growth and employment across the economy?). However, when it comes to prediction, standard econometric models tend to “over-fit” samples and sometimes generalise poorly to new, unseen data.
This is because there are two sources of prediction error in modelling – from bias (e.g. due to excluding key explanatory factors from the model) and from variance (making the model too sensitive to the data).
Typically, the more complex a model is, the higher the variance and the lower the bias – with prediction error being minimised at some mid-point of complexity. Whilst econometricians have dedicated a lot of energy to eliminating bias when answering policy questions, much less attention has been paid to minimising variance.
This is where machine learning comes in. By focusing on prediction problems, machine learning models can minimise forecasting error by trading off bias and variance. The forecasting improvements from perfecting this trade-off can be considerable. Take our example below: we re-ran our GDP nowcasting model with the same data using a standard econometric regression model - this time without optimising bias and variance – and the difference in forecasting performance is stark.
- Letting the (big) data talk
While econometric models are best kept relatively simple and easy to interpret, machine learning methods are capable of handling huge amounts of data, often without sacrificing interpretation.
For example, the “elastic net” algorithm used in our GDP nowcasting analysis can handle more data series than there are data points, and is capable of selecting the series worth keeping in the model over time, based on their predictive power. What’s more, the algorithm still presents the individual effect of each variable as in standard econometrics, and is capable of handling common issues of ‘multicollinearity’ (where two or more variables are highly correlated with one another) that plague standard econometric models.
In this way, machine learning “lets the data talk”, whilst econometrics is more restricted to using economic theory to craft small but interpretable models.
However, whilst it may seem attractive to let the data talk first in cases where little prior knowledge is available about the underlying causal relationships, over-reliance on the data can lead to problems for the unwary. A common example of this is the relationship between price and demand. Typical machine learning approaches have sometimes found a positive relationship between these variables over time, but economists know that the effect of higher prices on demand will almost always be negative, so can easily spot that these models need reworking to avoid spurious correlation.
Human experts and machine learning work better together
All of this points to the need to combine the best of established economic expertise and machine learning techniques to get the best results – you can’t take the human expert out of the loop (at least not just yet).
Take the problem of predicting GDP growth. Powerful, non-linear machine learning methods like neural networks and random forests have in many settings out-performed linear methods like the elastic net, but – as we have found – they have been less successful in forecasting GDP growth. The reason for this is simple: GDP is a linear combination of different economic components (e.g. the sum of the value added of different industry sectors) and, therefore, the prediction problem is also linear. Knowing the structure of the economy allows us to choose a machine learning technique and a set of potential explanatory variables that has the best chance of success for the purpose in hand. We have also found that human judgement is critical in interpreting whether the results of a particular machine learning algorithm make sense.
More generally, this is just one example of why businesses and other organisations should look for ways in which machine learning (and other forms of AI) can augment human expertise rather than replacing it. This will maximise the benefits from these new technologies while minimising the disruption they bring to the jobs market.