Advancing Analytics
Data Science | AI | DataOps | Engineering
backgroundGrey.png

Blog

Data Science & Data Engineering blogs

10 Incredibly Useful Time Series Forecasting Algorithms

To Make An Impact In Your Business

By Gavita Regunath and Dan Lantos

“The goal of forecasting is not to predict the future but to tell you what you need to know to take meaningful action in the present.”

— Paul Saffo

This article aims to provide a general overview into time series forecasting, the top time series algorithms that have been widely used to solve problems, followed by how to go about choosing the right forecasting algorithm to solve a specific problem.

What is time series forecasting?

Time series forecasting is a data science task that is critical to a variety of activities within any business organisation. Time series forecasting is a useful tool that can help to understand how historical data influences the future. This is done by looking at past data, defining the patterns, and producing short or long-term predictions.

Use Cases: Time Series Forecasting

Time series forecasting problems are everywhere, however, to provide context, these are a few examples of how it is being used to solve real-world problems:

  • Forecasting the spread of COVID-19

  • Forecasting the prices of Bitcoin

  • Forecasting the depletion level of stocks in stores

  • Forecasting the number of flights taking off from a busy airport

  • Forecasting the daily generation of wind power

  • Forecasting an avalanche in a famous ski resort

  • Forecasting internet web traffic for data science blog website

Components of time series forecasting models

There are four general components that a time series forecasting model is comprised of:

  • Trend: Increase or decrease in the series of data over longer a period.

  • Seasonality: Fluctuations in the pattern due to seasonal determinants over a period such as a day, week, month, season.

  • Cyclical variations: Occurs when data exhibit rises and falls at irregular intervals.

  • Random or irregular variations: Instability due to random factors that do not repeat in the pattern.

Figure 1 below shows an example of time series decomposition from the original data into the three components.

1_9Sxm0KrGRoo8TBKKnV94Jw.png

Figure 1: Example of time series decomposition from the data into the three components: trend, seasonal, and irregular

Difference between Univariate and Multivariate Time Series Models

There are two types of time series models:

  1. Univariate time series: Time series with a one time-dependent variable and a single independent variable.

  2. Multivariate time series: Time series with one time-dependent variable and more than one independent variable.

Time series analysis vs time series forecasting: What’s the difference?

Time series analysis is a method used for analysing time series data in order to extract meaningful statistical information from the data. Time series forecasting however, is all about predicting future values based on previously observed values over time.

Top 10 algorithms

  1. Autoregressive (AR)

  2. Autoregressive Integrated Moving Average (ARIMA)

  3. Seasonal Autoregressive Integrated Moving Average (SARIMA)

  4. Exponential Smoothing (ES)

  5. XGBoost

  6. Prophet

  7. LSTM (Deep Learning)

  8. DeepAR

  9. N-BEATS

  10. Temporal Fusion Transformer (Google)

Autoregressive (AR): An autoregressive (AR) model predicts future behaviour based on past behaviour. It’s used for forecasting when there is some correlation between values in a time series and the values that precede and succeed them.

Autoregressive Integrated Moving Average (ARIMA): Auto Regressive Integrated Moving Average, ARIMA, models are among the most widely used approaches for time series forecasting. It is actually a class of models that ‘explains’ a given time series based on its own past values, that is, its own lags and the lagged forecast errors, so that equation can be used to forecast future values.

Seasonal Autoregressive Integrated Moving Average (SARIMA): Seasonal autoregressive integrated moving average (SARIMA) models extend basic ARIMA models and allow for the incorporation seasonal patterns.

Exponential Smoothing (ES): Exponential smoothing is a time series forecasting method for univariate data that can be extended to support data with a systematic trend or seasonal component.

Prophet: Prophet, which was released by Facebook’s Core Data Science team, is an open-source library developed by Facebook and designed for automatic forecasting of univariate time series data.

LSTM: Long Short-Term Memory (LSTM) is a type of recurrent neural network that can learn the order dependence between items in a sequence. It is often used to solve time series forecasting problems.

DeepAR: DeepAR developed by Amazon is a probabilistic forecasting model based on autoregressive recurrent neural networks.

N-BEATS: N-BEATS is a custom Deep Learning algorithm which is based on backward and forward residual links for univariate time series point forecasting.

Temporal Fusion Transformer (Google): A novel attention-based architecture which combines high-performance multi-horizon forecasting with interpretable insights into temporal dynamics.

How to choose the right forecasting model?

Producing high quality time series forecasts is not a trivial problem, and choosing the right model can be even more challenging. There are a number of factors to consider when it comes to selecting which time series forecasting method to apply. For example:

  • Work out the amount of accuracy or inaccuracy we can tolerate with our model?

  • How much value or benefit does the forecasting model bring? Defining the business problem, who the key stakeholders are, how the relevant market works, and the nature of the customer base are all factors that will help determine the accuracy and power required from forecasting models, and hence govern the selection.

  • Is a univariate or a multivariate time series forecasting problem? Understanding the data available and the utilisation of the data for forecasting is important for choosing the model.

  • How much volume of data is available? More data is often more helpful, offering greater opportunity for exploratory data analysis, model testing and tuning. Some methods, such as exponential smoothing or neural network, require more historical data than others.

  • What is the time horizon of predictions required? Shorter time horizons are often easier to predict offering higher confidence levels than longer time horizons.

Figure 2: Cost of forecasting versus cost of inaccuracy (from “How to Choose the Right Forecasting Technique,” by John C. Chambers, Satinder K. Mullick, and Donald D. Smith, Harvard Business Review, July 1971)

Summary

In this article, we reviewed the fundamentals of time series forecasting and listed a few popular forecasting methods that can help make a significant impact in an organisation.

The next article will aim to showcase an end-to-end example of using time series forecasting techniques to solve real-world problems.

Not too sure where to get started? Then take a Three Week Forecasting Challenge.

Recommended reading