Machine learning is a technology that can be used for demand forecasting in order to make demand forecasts more accurate and reliable. In demand forecasting, machine learning techniques are used to forecast demand for a product or service. There are different types of machine learning/deep learning techniques used in demand forecastings such as neural networks, support vector machines, time series forecasting, and regression analysis. This blog post will introduce different machine learning & deep learning techniques for demand forecasting and give an overview of how they work.

Table of Contents

## What is the demand forecasting process?

The demand forecasting process is defined as the creation of demand forecasts, demand planning, and demand decision support. Demand forecasting is a key component of demand management that can be used to support demand planning and decision-making. Demand forecasting enables businesses to make informed decisions about how much product or service should be produced based on expected demand (which may not always equal actual demand).

Demand forecasting techniques can be used to predict demand in different domains such as the following:

**Supply-chain demand forecasting**represents demand prediction for products and services by suppliers, manufacturers, wholesalers, and retailers. Demand forecasting is a critical component of supply chain management, directly affecting production planning and order fulfillment. Accurate forecasts have an impact across the whole supply chain and manufacturing plant organization: operational and strategic decisions are made on resources (allocation and scheduling of raw material and tooling), workers (scheduling, training, promotions, or hiring), manufactured products (market share increase, production diversification) and logistics for deliveries.**Travel/Ride-sharing**(car sharing, bike sharing) demand forecasting represents demand prediction for services such as Uber, Lyft, etc. Additionally, travel demand forecasting also includes demand prediction for air, rail, bus transportation.**Airline demand forecasting represents**demand predictions for airlines by considering factors such as the number of passengers, amount of luggage, and airfares offered.**E-commerce demand forecasting**: Examples include forecasting inventory demand for e-commerce retailers or demand for online advertising.**Electricity demand forecasting**: Examples include forecasting electricity demand for the next day, demand for next week, demand in the peak hours and off-peak hours, etc in relation to residential, commercial, and industrial demands.**Tourism demand forecasting**: Examples include demand prediction for hotel demand, tourist attractions demand, cruise demand, etc. Enterprises and governments have started to increase the investment in tourism demand forecasting to make tourism demand forecasting more accurate. Accurate tourism demand forecasting benefits managers from enterprises and governments to formulate more efficient public policies and commercial decisions.**Water demand forecasting**: demand for water (e.g., residential, commercial and industrial demand)**Retail demand forecasting**represents the demand prediction of products by retailers such as supermarkets, convenience stores, specialty shops (antiques), departmental stores etc.**Marketing demand forecasting**represents demand prediction that is used to forecast sales volumes and revenue across different business units or divisions in order to support marketing decisions and demand planning.

## What are different machine learning techniques which can be used for different types of demand forecasting?

With the rise of Artificial Intelligence (AI), data scientists have started to utilize machine learning models for demand forecasting, which, in many cases, can produce higher prediction accuracy than traditional statistical models. It is important to understand the nature of demand in order to train machine learning models. Demand types can be categorized into some of the following categories:

- Smooth (regular demand occurrence and low demand quantity variation)
- Erratic (regular demand occurrence and high demand quantity variation)
- Intermittent (irregular demand occurrence and low demand quantity variation)
- Lumpy (irregular demand occurrence and high demand quantity variation)

There are two different aspects of demand forecasting which can be tackled using machine learning techniques:

- Predicting the demand occurrence: A classification model can be trained to predict demand occurrence. AUC ROC metrics can be used for evaluating the model. A nested cross-validation approach is used for model evaluation. This is frequently used to evaluate time-sensitive models.
- Estimating the demand size: A regression model can be trained to predict demand sizes

The current forecasting methods can be divided into three key classes such as the following:

**Time series models**: Time series models can be divided into basic time series models and advanced time series models. Basic time series models include Naive Bayes, Auto Regression (AR), Moving Average (MA), Exponential Smoothing (ES), Historical Average (HA), etc. The advanced time series models include seasonal Naive、ARIMA、 ARIMAX、SARIMA、SARIMAX, etc.**Econometric models**: Econometric models can be divided into static econometric models and dynamic econometric models. Static econometric models include linear regression, gravity model, etc. Vector autoregressive (VAR), error correction models (ECM), and time-varying parameter (TVP) are the three representative models of dynamic econometric models. Compared to static econometric models, dynamic econometric models can capture the time-varying of consumer preferences and enhances the forecasting performance of econometric models.**AI-based models**: When processing a large amount of data, generally, AI-based methods can obtain better performance than traditional methods. The excellent performance of AI-based methods could rely on its internal feature engineering ability. However, AI-based methods are considered black boxes, i.e., AI-based methods are weak in interpretability. In the past years, with the development of AI, more AI-based methods started to be adopted by studies, e.g., Support Vector Regression (SVR), k-nearest neighbor (k-NN), Artificial Neural Network (ANN), Recurrent Neural Network (RNN), Long-short term memory (LSTM). Note that Long Short Term Memory (LSTM) is an improved variant of RNN. Compared to RNN, LSTM adds cell state to memorize long-term dependency, and uses input gate, output gate, and forget gate to handle cell state and mitigate gradient vanishing.

The following are different machine learning techniques that can be used for demand forecasting in some of the following domains. More domains will be covered at a later point in time.

**Travel demand forecasting**: Machine learning techniques have been used to model different aspects such as some of the following:- Relationship between built-environment characteristics and ridership ((Gradient boosting machine techniques)
- Investigate the nonlinear associations between the built environment and origin-destination ridership (Gradient boosting machine techniques)
- Explore the key factors associated with the sidesplitting adoption rate and, ride-sourcing direct demand modeling(Random forest)
- Forecast ride-sourcing demand using deep neural networks such as CNN
- Forecast the taxi-hailing demand using an attention-based deep ensemble network
- Improve prediction accuracy using clustering-aided ensemble learning that integrates clustering and machine learning techniques to build ensembles (i.e., the aggregation of a group of models). This approach usually consists of two separate steps: A. Create a group of independent cluster-level submodels. B. Combine individual models to form an ensemble. It is found that with the incorporation of clustering as a preprocessing technique, the proposed framework outperforms independent prediction models and generates valuable cluster-specific interpretation

**Electricity demand forecasting**: Machine learning techniques can be used to predict the magnitude and occurring time of electricity peak load/demand, which can not only give the power plants sufficient start-up time to avoid grid congestion but also is fundamental in ensuring the economic benefits and the security and stability of the power grid. With the increasing penetration of large-scale intermittent energy such as wind and solar as well as energy storage power stations, it has given rise to new characteristics of peak loads and a more challenging task for peak load/ demand forecast. The algorithms such as regression and time-series forecasting (ARIMA, SARIMA) can be used to get started with the modeling. However, other advanced algorithms such as ensemble learning algorithms, SVM, and deep neural networks (LSTM) have also been used for modeling different aspects of demand forecasting. It has been found that neural network architecture such as LSTM has high prediction accuracy in predicting power demand. It will be useful to read this paper. The following are three different aspects of electricity demand forecasting:- Peak load forecasting/estimation/prediction
- Peak load demand forecast/estimation/prediction
- Maximum load forecasting/estimation/prediction

**Tourism demand forecasting:**Tourism demand forecasting is done using time-series methods. With the development of deep learning technology, machine learning & deep learning methods have been adopted in research, e.g., SVR, ANN, LSTM, CNN. Recently, a time-series Transformer based approach is tested for tourism demand forecasting. The advantages of the proposed time-series transformer are parallel computation and long-term dependency processing, and the residual connection allows the model to stack deeper. The time-series transformer overcomes non-parallel training, gradient vanishing and memory capacity limitation of LSTM, and the requirement of deeper CNN to obtain a larger receptive field. The detail could be read in this paper.

Machine learning techniques are being used for demand forecasting in many different fields. The specific technique you use will depend on the field, but there is no shortage of demand forecasting machine learning techniques to choose from. For example, neural networks have been found to be useful when predicting power demand and tourism demand forecasts respectively. When it comes time to make your own demand forecast or estimate, keep this article handy as a reference guide. It might also help if you want some professional assistance with creating an algorithm that can accurately predict future sales based on historical data – give us a call! We’re always happy to chat about how we can assist you with any project involving predictive modeling or analytics.

- Softmax Regression Explained with Python Example - May 24, 2022
- Neural Network Explained with Perceptron Example - May 23, 2022
- Classification Problems Real-life Examples - May 23, 2022

fascinating and helpful. Do you have a subscription?

Thank you for your feedback. Please sign up for the newsletter.