## 3 Proposed Methodology for Out-of-Stock Prediction Model Using BCHO-TCN LightGBM
### Working of TCN LightGBM in Out-of-Stock Prediction  
The concatenated feature extraction output \(T\) forms the input for the out-of-stock prediction model. The deep temporal CNN, which has been designed to support time-series data, visualizes the temporal conditions of the data through causal convolution and dilation, and is thus able to capture long-term dependencies without the leakage of future information. In this way, the entire process aims to provide feedback on these features in the form of temporal patterns and trends in the LightGBM model. LightGBM, which is a powerful platform with high efficiency and accuracy, fine-tunes the feature representations and predicts the occurrence possibility of out-of-stock situations based on the extracted features. This hybrid approach integrates the strengths of deep learning techniques with those of the gradient boosting method, which helps to preserve reliability and accuracy in prediction, and leads to a proactive stock management strategy aimed at preventing or reducing out-of-stock situations.  
Time-series data are effectively handled by TCNs, specialized convolutional neural networks designed for this purpose. TCNs follow two important principles: maintaining the output length consistent with the input sequence, like long short-term memory (LSTM) networks, and avoiding information leakage from the future to the past through the use of causal convolutions. Unlike standard convolutions, causal convolutions utilized in TCNs do not take future values as inputs when calculating the output at a given time step. This means that the output at time \(t\) is generated using a kernel size \(s\) and the values of \(T_{t-(s-1)},T_{t-(s-2)},....,T_{t-1},T_{t}\). Additionally, zero padding of length \(s\) is implemented at each layer to maintain consistency in the input sequence length.  
In addition, in order to capture more extensive patterns over time, temporal convolutional networks utilize one-dimensional dilated convolutions. These convolutions help expand the network's field of perception without the need for pooling operations, ensuring that resolution is not sacrificed. Dilation involves skipping certain values between input points in the convolutional process. The overall process of dilated causal convolution across successive layers can be expressed as follows:  
\[TCN=h\left(\sum_{s=o}^{s-1}w_{sn}^{s}y_{(m-1)}^{(t-(s\times e))}+b_{m}\right) \tag{14}\]  
At position \(t\) in the \(m\)th layer of a neural network, \(TCN\) represents the neuron output, \(s\) denotes the convolutional kernel width, \(w_{m}^{s}\) is the weight at position \(s\), \(e\) is the convolution dilation factor, and \(b_{m}\) is the bias term. Here, \(h\) in the equation refers to the activation function used on the result of the convolution. Rectified Linear Units (ReLU) are commonly used as the activation function \((h(y)=\max(0,y))\). To increase the network's receptive field, multiple TCN blocks can be concatenated, but these result in more parameters and complicate learning. To address this, a residual connection is added to each TCN block's output, following the concept introduced to improve performance in deep architectures, where the input of the TCN block is added to its output \((o=h(y+F(y)))\).  
The characteristics possessed by TCNs make them well suited for tackling complex time-series issues. One key advantage of TCNs is their ability to manage inputs of varying lengths through the use of a one-dimensional causal convolutional kernel, similar to RNNs. Additionally, TCNs are more efficient in terms of memory compared to recurrent networks, as they can process long sequences simultaneously due to their shared convolution architecture. Unlike RNNs, which process input sequences sequentially and result in increased computation time, TCNs are trained using the standard backpropagation algorithm, eliminating the gradient issues associated with the backpropagation through time (BPTT) algorithm used in RNNs.