## 3 Methods
### Feature Engineering  
After pre-processing the Rossmann and Walmart datasets, the feature selection is initially accomplished by employing MRMR and RFE techniques. Generally, the feature selection process decreases the feature sets by choosing the most active features or eliminating the drossy features. MRMR is chosen, as it identifies the relevant features and minimizes the redundancy, thus enhancing the classification accuracy. Therefore, the MRMR overcomes the other techniques based on the accuracy and number of supportive features. The MRMR is a feature measurement criterion; it computes the redundancy and correlation between the features based on mutual information. Here, the MRMR technique performs feature selection by following two conditions, such as maximal relevance (\(max_{R}\)) and minimal redundancy (\(min_{D}\)), which are mathematically specified in Equations (3) and (4). Moreover, \(m(x,y)\) denotes the mutual information, and \(f\) denotes a set of features. The mathematical expression of mutual information \(m(x,y)\) is represented in Equation (5). \[max_{R}=\frac{1}{\left|f\right|}{\sum}_{i\in f}m(k,i) \tag{3}\]  
\[min_{D}=\frac{1}{\left|f\right|^{2}}{\sum}_{i,j\in f}m(i,j) \tag{4}\]  
\[m(x,y)=\iint q(x,y)log\frac{q(x,y)}{q(x)q(y)}dxdy \tag{5}\]  
On the other hand, the RFE is one of the effective feature selection techniques which fits the model and eliminates irrelevant features, until the discriminative active features are selected [33]. RFE is selected here because it efficiently minimizes the dimensionality of high-dimensional datasets by removing redundant features to help enhance the computational and storage necessities. The RFE technique includes three major benefits: (i) complete elimination of irrelevant information in the data, (ii) ease in performing data visualization, and (iii) required limited computational power. By considering Equations (3) and (4), Equation (6) is generated. The RFE technique efficiently selects the optimal feature subsets using Equation (6). \[maxQ(D,R);Q=D-R \tag{6}\]  
In addition to this, feature optimization is carried out utilizing the APSO algorithm, where it selects active features from the pre-processed Rossmann and Walmart datasets. The APSO algorithm is applied here, as it selects the algorithmic constraints at run time to enhance the exploitation efficiency, and it performs a global search over the entire search space with a higher convergence speed. As discussed in the previous sections, this process decreases the complexity of the Bi-GRU model and its processing time. The conventional PSO algorithm is one of the effective metaheuristic-based optimization algorithms [34] that generally mimics the behavior of birds and fish schooling [35]. The velocity and the position of the particles are updated in the PSO algorithm by Equations (7) and (8). \[v_{id}(n+1)=I_{w}\times v_{id}(n)+c_{1}\times r_{1}\times[p_{id}(n)-x_{id}(n) ]+c_{2}\times r_{2}\times\left[p_{gd}(n)-x_{id}(n)\right] \tag{7}\]  
\[x_{id}(n+1)=x_{id}(n)+v_{id}(n+1) \tag{8}\]where the global best positions of the particles are represented as \(p_{gd}\); the present best positions of the particles are denoted as \(p_{id}\); the random numbers are indicated as \(r_{1}\) and \(r_{2}\); the acceleration coefficients are denoted as \(c_{1}\) and \(c_{2}\); the inertia weight is represented as \(l_{w}\), used for balancing the local and the global searches; and the iteration number is indicated as \(n\). The APSO algorithm optimizes the features based on Adaptive Uniform Mutation (AUM) function from the Human Group Optimization (HGO), where the particle's positions (features) are denoted as \(p_{i}(n)=(p_{i,1},p_{i,2},p_{i,D})\). The AUM function extends the ability of feature optimization in the exploration phase. Additionally, a nonlinear function, \(p_{m}\), is employed for controlling the mutation range and decision in each particle. The nonlinear function, \(p_{m}\), is updated in each iteration by performing Equation (9).