## 3 The Proposed Imputation Method
### Iterative Feature Optimization
#### 3.2.1 Finding Important Features  
For several reasons, when imputing missing values in a feature (\(f_{i}\)), using all the remaining features in the dataset is not always the most effective strategy. First, in high-dimensional datasets, the number of features can be significant, resulting in longer computing time. Second, the overall performance of the model estimates may be compromised because not all remaining features have a strong correlation with \(f_{i}\). To address these issues, the proposed imputation approach selects features using one of the PSO-optimization algorithms. However, it is important to note that the feature selection step is integral to the imputation process, demonstrating its effectiveness through the promising imputation results obtained in our model.  
Before explaining the process of finding the important features, let us first describe how to split the data into training and test sets. This is a flexible approach that is not based on a predefined percentage. As illustrated in Figure 3, let \(f_{i}\) be \(f_{3}\); thus, all the training patterns are the rows that have observed values in \(f_{3}\), while the remaining rows form the test set. In order to implement an optimizer (e.g., PSO or GWO) on the training set that has missing values, it must first be divided into a training set and a test set, denoted as \(X_{tr}\) and \(X_{ts}\), respectively. Let us simply use the PSO optimizer, where the first step in PSO is to generate \(N\) solutions, \(S=\{\mathbf{s}_{1},\mathbf{s}_{2},\ldots,\mathbf{s}_{N}\}\), where each solution \(\mathbf{s}_{i}\) is represented as a binary vector of length \(\hat{m}-1\), with each element indicating the selectivity of the corresponding feature. A randomly generated set of initial solutions is used to start the process. Each solution is evaluated using a fitness function \(\mathcal{F}\), which gives a fitness value \(O_{i}=\mathcal{F}(\mathbf{s}_{i})\). This fitness function is defined in Equation (9). The features indicated by the solution  
Figure 3: Visualization of the iterative search phase in the proposed feature selection-based imputation method.  
are trained on \(X_{tr}\), and the selected features from \(X_{ts}\) are used to estimate the error, which represents the fitness value for \(\mathbf{s}_{i}\). However, to build this regression model, features other than \(f_{i}\) must be imputed to create a complete dataset, which is essential for constructing a regression model using various algorithms. To achieve this, we use a simple single imputation method, namely the median.  
\[O_{i}=\mathcal{F}(\mathbf{s}_{i})=\frac{1}{N_{test}}\sum_{j=1}^{N_{test}} \text{Error}(y_{j},\hat{y}_{j}) \tag{9}\]  
where \(N_{test}\) is the number of samples in the test set, \(y_{j}\) represents the true or observed values of the \(j\)-th instance in \(X_{ts}\), and \(\hat{y}_{j}\) represents the predicted values based on the selected features indicated by the solution \(\mathbf{s}_{i}\). This fitness evaluation process is repeated for all solutions. Fitting a solution involves changing the selected features; this, in turn, affects the fitness value. A maximum number of iterations or a minimum improvement per iteration can be defined as the stopping condition. Ultimately, PSO identifies the optimal set of features that minimizes the predicted error between the observed values and the predicted values. This selected set of informative features is then used to train the model.  
The example in Figure 3 shows that the selected feature is \(f_{3}\) and the remaining features are \(\{f_{1},f_{2},f_{4},f_{5},f_{6}\}\). The original data are then divided into two sets: training and test. The training set is then used to find and select the most informative features from the remaining ones. As shown, there are only three features in this example. These features should be the best-correlated features to \(f_{3}\).