# Demand Forecasting in Supply Chain Using Uni-Regression Deep Approximate Forecasting Model
## 4 Proposed Uni-Regression Deep Approximate Forecasting Model (UDAF) in Demand Forecasting  
The feature extraction output vector forms the input for the uni-regression deep approximate forecasting model in demand forecasting. This demand forecasting methodology involves the use of statistical and time series features as inputs to two separate predictive models. The first model is a recurrent BiLSTM network, which belongs to the family of neural networks that can represent time dependencies and complex sequential patterns. Drawing on the bidirectional structure, BiLSTM is capable of capturing historical patterns and relationships in input features that enable the representation of changing demand dynamics. The BiLSTM model is well suited for demand forecasting when there is a limited amount of historical data or when the demand patterns are nonlinear. The BiLSTM model also can forecast both time series and cross-sectional data. At the same time, an NARX model is used for demand forecasting. It is most likely that this model can look beyond historical information and account for external factors that may affect demand, thus developing a fuller view of the variables influencing it. The final demand forecast was formed by integrating the recurrent BiLSTM network and NARX models. The application of this fusion approach is aimed at improving the general accuracy and reliability that can be observed in forecasting results by embedding partial insights based on various modeling techniques, which helps to provide a more complete picture of future demands in terms of dynamic processes linked with supply chains.  
(i) NARX Neural Network  
NARXNN is introduced as a superior edition of NARNN, which is a nonlinear autoregressive neural network. Unlike NARNN, which employs a single delayed feedback loop of the output regressor, NARXNN includes two tapped-delay lines from the input-output signals [47]. Consequently, NARXNN has the capability to incorporate external input values into the parametric equation.  
\[i(q)=k\Big{[}a(q);\ \bar{v}(q);\ \bar{i}(q-1)\Big{]} \tag{14}\]  
\[i(q)=k\Big{[}a(q),\ \dots\dots\ a(q-y_{D}+1);\ \dot{a}(q),\ \dots\dots\ \dot{a}(q-y_{i}+1)\Big{]} \tag{15}\]  
The discrete time step \(q\) represents the model input and output as \(\bar{v}(q)\in\Re\). The input and output memory orders are represented by \(y_{N}\geq 1\), with \(\{y_{N},y_{i}\}\in N^{*}\). The feedback loop enhances the NARXNN predictor's responsiveness to past data.  
The NARXNN algorithm contains a feed-forward network with two layers. The output layer applies a linear transfer function, whereas the hidden layer employs a sigmoid function \((\sigma)\) that is computed.  
\[\sigma(u)=\frac{1}{1+\exp(-\sigma)} \tag{16}\]This network has a unique feature wherein tapped delay lines are used to store previous values of the \(v(q)\) and \(i(q)\) sequences. The NARXNN's output \(i(q)\) is then fed back into the network's input with a delay. There are two different training modes for the NARXNN model:  
1. Series-Parallel (SP) Mode One that uses feedback-delayed information from real values.
2. Parallel (P) Mode One that uses feedback-delayed information from real values and sets estimated outputs for the output's regressor.