A conditional opposition-based particle swarm optimisation for feature selection

Because of the existence of irrelevant, redundant, and noisy attributes in large datasets, the accuracy of a classification model has degraded. Hence, feature selection is a necessary pre-processing stage to select the important features that may considerably increase the efficiency of underlying classification algorithms. As a popular metaheuristic algorithm, particle swarm optimisation has successfully applied to various feature selection approaches. Nevertheless, particle swarm optimisation tends to suffer from immature convergence and low convergence rate. Besides, the imbalance between exploration and exploitation is another key issue that can significantly affect the performance of particle swarm optimisation. In this paper, a conditional opposition-based particle swarm optimisation is proposed and used to develop a wrapper feature selection. Two schemes, namely opposition-based learning and conditional strategy are introduced to enhance the performance of the particle swarm optimisation. Twenty-four benchmark datasets are used to validate the performance of the proposed approach. Furthermore, nine metaheuristics are chosen for performance verification. The findings show the supremacy of the proposed approach not only in obtaining high prediction accuracy but also in small feature sizes.


Introduction
Due to the rapid growth of computer science and technology, the dataset is becoming much bigger and bigger. However, a big dataset normally contains an enormous number of features. Some of these features might be considered redundant, irrelevant, or noisy information that can negatively affect the performance of the classifier (AbdEl-Fattah Sayed et al., 2016;Kumar et al., 2020). Also, a large number of features in a dataset will exceedingly raise temporal and spatial complexity, which is a challenge that is inevitable in real-world problems. This explains why the classification algorithms usually face difficulty when dealing with high dimensional feature vector (Lin et al., 2018;Nagra et al., 2020). Thus, feature selection (FS) can be a good option for dimensionality reduction (see Figure 1).  FS is one of the popular dimensionality reduction techniques to eliminate redundant and noisy attributes and select the relevant features as well. Consequently, selecting a set of significant features from a big dataset not only enhances the accuracy of the classifier, but also decreases the unnecessary computational complexity (Emary et al., 2016;Sreeja, 2019). Generally speaking, FS can be classified into filter, wrapper, and embedded approaches (see Figure 2). Filter approaches are independent of the learning algorithm, and they are often computationally cheaper (Nguyen, Ly, et al., 2020). In contrast, wrapper approaches make use of a specific classifier as part of the evaluation. In embedded approaches, the model includes a built-in FS algorithm. Because of the inclusion of a learning model, the wrapper approaches can usually perceive excellent classification results (Xue et al., 2014).
In wrapper approaches, the FS is known as an NP-hard combinatorial optimisation. To resolve this challenging problem, many researchers employ metaheuristic algorithms to perform the local and global searches for finding an optimal feature subset (Nayak et al., 2018). In recent years, many metaheuristic algorithms have been proposed for the optimisation tasks such as particle swarm optimization (PSO) (Kennedy, 2011), genetic algorithm (GA) (Holland, 1992), moth flame optimization (Mirjalili, 2015), grey wolf optimizer (Mirjalili et al., 2014), gravitational search algorithm (Rashedi et al., 2009), salp swarm algorithm , and artificial bee colony (Karaboga & Basturk, 2007). For wrapper-based FS, PSO and GA are the most frequently used.
PSO is a swarm intelligence algorithm that mimics the social interaction behaviuor of bird flocking and fish schooling in nature. Previous works show that PSO can provide excellent performance when dealing with the FS problem. However, the imbalance between exploration and exploitation is still an issue in PSO, which may limit the performance of PSO in feature evaluation. Therefore, an adaptive mechanism that can automatically adjust the conditions (exploration phase or exploitation phase) is desired. Besides, No Free Lunch theorem indicates that no single optimiser can handle all the problems perfectly (Wolpert & Macready, 1997). This theorem encourages the researchers to modify, enhance, and evolve the algorithm for improving the performance of the model to better solve a particular set of problems.
In this article, a new variant of PSO called conditional opposition-based particle swarm optimization (COPSO) is proposed for FS problems. The COPSO utilises opposition-based learning (OBL) and conditional strategy. The former generates the opposite solutions, which aims to ameliorate the quality of initial solutions and global best solution (gbest) in the population. The latter guides the particles to explore or exploit based on their fitness values. In this way, a well stable balance between local search and global search can be achieved. Twenty-four benchmark datasets are collected to test the performance of the COPSO. Nine metaheuristic algorithms are employed to measure the efficacy and efficiency of the proposed algorithm. Our experimental results reveal that the COPSO was highly capable of selecting a set of significant features, which led to excellent classification results. The primary contributions of this work are as follows: • A COPSO is proposed for FS problems. The OBL strategy is embedded into the COPSO to enhance the quality of the initial solutions and global best solution. • A conditional strategy is introduced and implemented into COPSO. This strategy enables the COPSO to adaptively switch the local search and global search behaviours. • The performance of COPSO is validated and tested using 24 benchmark datasets (from low to high dimensions). • The COPSO is compared with nine modern optimisers. The experimental results reveal its effectiveness in FS works.
The rest of this paper is organised as follows: Section 2 provides reviews of related works and details the standard PSO. Section 3 describes the proposed COPSO and its application for FS. The experimental results are discussed in Section 4. Finally, Section 5 concludes the outcomes of this paper.

Background
In this section, the related work that representing the state of the arts have been presented and discussed accordingly. Besides, the background and preliminaries of the standard PSO algorithm are presented in this section as follows.

Related works
In the past decade, metaheuristic algorithms have been regarded as favourable and predominant tools to seek out the potential features over the search space. Due to their excellent search capability, these algorithms are often used by the research community to tackle the FS problems (Faris et al., 2020;Hancer, 2019). Different metaheuristic algorithms such as PSO (Xue et al., 2014), GA (Huang & Wang, 2006), and ant colony optimisation  were employed to handle such problems. The studies in (Ibrahim et al., 2021;Nguyen, Xue, et al., 2020) also pointed out the effectiveness of metaheuristic algorithms in FS works. Additionally, (Agrawal et al., 2021) presented the comprehensive review of binary metaheuristic algorithms in tackling the FS tasks.
The GA is an evolutionary algorithm inspired by the biological evolution in nature. It evolves the solutions through three major operators: selection, crossover, and mutation. The GA was first applied to handle FS problems in (Siedlecki & Sklansky, 1989). However, the major drawback of GA is that it required long processing time to reach an optimal solution (Gunasundari et al., 2016). Thus, (Jude Hemanth & Anitha, 2019) modified the GA by implementing the "OR" and "AND" logic operations for FS. The proposed approach was able to reduce the randomness and achieved an increment of 4-6% accuracy in magnetic resonance image classification. Lately, a fast rival genetic algorithm was proposed in (Too & Abdullah, 2020b) for FS problems. The study showed that the proposed method could often find the informative feature subset within a short period. Another study in (Mazaheri & Khodadadi, 2020) demonstrated the efficiency of NSGA II in choosing the potential features.
In (Kashef & Nezamabadi-pour, 2015), an advanced version of ant colony optimization (ACO) was developed for FS. The proposed approach used the statistical properties to initialise the heuristic information, which provided a better guidance for the ants to seek the optimal feature subset. To enhance the accuracy of the Mars image classification, (Rashno et al., 2017) proposed two variants of ACO algorithms to select high-quality features. They reported their proposed method could outperform GA with the confidence level higher than 0.95. The authors in (Mafarja & Mirjalili, 2017) performed a hybridisation of whale optimisation algorithm and simulated annealing for FS. In their hybrid approach, the simulated annealing was applied to enhance the exploitation capability of the search agents when searching the promising areas. Another similar work was done in (Too & Abdullah, 2020a), in which a binary atom search optimisation was proposed to tackle the FS problems. Furthermore, (Gokalp et al., 2020) utilised the Iterated Greedy metaheuristic to select the quality features for improving the performance of the sentiment classification.
In recent days, PSO has successfully applied to many FS applications. As compared to GA, PSO is computationally less expensive, thereby receive much attention from the researchers in FS studies. However, PSO suffers from immature convergence and slow convergence rate, which makes it less efficient in finding the global optimum (Gou et al., 2017;Zhang et al., 2017). Besides, the imbalance between exploration and exploitation is another key factor that degrades the performance of the PSO algorithm (Xia et al., 2019). Hence, the authors in (Lu et al., 2015) enhanced the performance of the standard PSO in text-based-FS by modifying the inertia weight and constriction factor. Furthermore, a pbest guided binary PSO was designed to handle the FS problems in electromyography signals classification (Too et al., 2019). The proposed approach borrowed the utility of differential evolution to evolve the quality of personal best solutions when the stagnation happened. However, their method was computationally expensive compared to PSO algorithm. Recently, (Ji et al., 2020) developed an improved binary PSO to solve the FS issues. They developed local search and global search operators to improve exploitation and exploration behaviours.
From the literature review, the FS problem with a large number of features is still an open challenge that needs some extra attention by researchers to find out the way to improve existing methods or develop a new strategy.

Standard particle swarm optimisation
Particle swarm optimization (PSO) was developed by Kennedy andEberhart in 1995 (Kennedy, 2011). It is a swarm intelligence algorithm that mimics the social interaction behaviour of bird flocking and fish schooling in nature. Initially, a population of N particles (solutions) is randomly initialised in a D-dimensional search space. Each particle maintains two vectors in the population, namely velocity, and position as follows: where X i and V i represent the position and velocity of particle i. In the swarm, the particle is guided by its best experience and the best experience of the whole swarm to move toward the global optimum. Iteratively, the particle updates its velocity and position as below: where t is the current iteration, d refers to the dimension, pbest and gbest denote the personal best solution and global best solution, respectively. The R 1 and R 2 are two vectors randomly distributed in [0,1], c 1 and c 2 are the acceleration coefficients, and w is the inertia weight.

Proposed conditional opposition-based particle swarm optimization
To date, PSO has been widely employed to various engineering applications. However, its mechanisms require tuning and modification to perform the best on a particular class of problems. This is because PSO suffers from immature convergence, and it cannot effectively escape from the local optima, thus leading to an ineffective solution (Gou et al., 2017;Zhang et al., 2017). Besides, PSO has the limitation of weak robustness to various problem structures (Cheng & Jin, 2015a). In addition, the particles are guided by pbest and gbest toward the global regions. From this point of view, the particles will slowly, and then become similar to gbest. If gbest is itself trapped in the local optimal, the search spaces of particles are limited to the same areas, thereby reducing the efficacy of PSO in finding the optimal solution (Cheng & Jin, 2015b;Chuang et al., 2008). Moreover, the contradiction between exploration and exploitation is another issue that strongly affects the performance of PSO in FS (Xia et al., 2019).
In this work, a conditional opposition-based particle swarm optimization (COPSO) is proposed to improve the performance of the PSO algorithm. Correspondingly, COPSO utilises OBL and conditional strategy. The former aims to evolve the quality of initial solutions and gbest in which the opposite solutions are well-considered. The latter automatically switches the local and global search, which intends to maintain the well stable balance between local search and global search.

Opposition based learning
Generally speaking, opposition-based learning (OBL) is a strategy that defines the opposite solution for each current solution in the population, and it then identifies whether the opposite solution can provide better fitness value than the current solution (Ewees et al., 2018). In any metaheuristic optimisation algorithm, an initial population of random solutions is generated and used to seek out the global optimum for a given optimisation problem. Due to the randomness and absence of knowledge in the initial solutions, these algorithms cannot dramatically converge to the global optimum. Hence, OBL is employed to overcome this defect.
In (Jabeen et al., 2009), the OBL was implemented into PSO to enhance the initial population by considering the opposite solution of initial particles. (Kang et al., 2018) implemented the hybrid algorithm that integrated probabilistic OBL into PSO to enhance the population diversity. The authors in (Aladeemy et al., 2020) proposed different variants of Opposition-based Self-Adaptive Cohort Intelligence to tackle the FS problems. Their approaches adopted the OBL to generate the opposite solutions for improving the diversity of the candidates. In OBL, the opposite number, X of the present X can be calculated as follow: where ub and lb denote the maximum value and minimum value of the search space. As for multidimensional search space, the opposite solution can be reformulated as: where D is referred to the number of dimensions. It is believed that the convergence of the algorithm can be improved by performing the search in the opposite direction (Abd Elaziz et al., 2017).
In the proposed approach, COPSO first integrates OBL to improve the quality of initial solutions, which enables the particles to perform the search more effectively. Algorithm 1 shows the procedure of OBL. Let N and D to be the population size and the total number of dimensions in the search space. At the beginning, COPSO randomly generates an initial population of N solutions. The fitness values of the solutions are then evaluated. Next, the initial solutions are used as the input for the OBL process. In this process, the opposite solutions are computed, and the fitness values of opposite solutions are calculated. After that, the initial solutions and opposite solutions are merged, and the best N solutions are chosen to build the new initial population.
Secondly, to assist the COPSO for escaping the local optimal, the OBL is applied to the gbest. At the end of each iteration, the OBL is used to compute the opposite solution of Algorithm 1. Opposition-Based Learning Input:Solutions (X) 1) for i = 1 to N 2) for d = 1 to D 3) Compute opposite solution using (4) 4) end for 5) Assess the fitness value of opposite solution 6) end for 7) Combine current and opposite populations 8) Best N solutions are chosen as new initial solutions, X new Output:High quality initial solutions (X new ) gbest. The opposite solution of gbest is defined as below: If the fitness value of the newly generated solution is better than the gbest, then the newly generated solution will replace the gbest. Otherwise, the gbest is retained.

Conditional strategy
In PSO, the proper balance between exploration and exploitation has regarded as a key factor that can significantly affect the performance of the algorithm when searching for an optimal solution (Jensi & Jiji, 2016). However, it is difficult to decide whether the particle should perform the global search or local search since the situation is varying according to various problem structures. In this paper, a new conditional strategy is proposed, which aims to automatically switch the local search and global search in the searching process. Figure 3 illustrates the concept of the conditional strategy. As shown in Figure 3, a comparison is made between the particle and its previous one. If the particle offers better performance than its previous one, then an exploration phase is executed. Conversely, an exploitation phase is promoted when the performance of the existing particle has become worst. Considering the minimisation case, the conditional strategy is formulated as: where F(.) is the objective function, and t is the iteration number. Note that the condition of each particle is examined to ensure all of them can perform the search according to proper circumstances.

Exploration phase
From the aforementioned discussion, the condition (exploitation phase or exploration phase) is determined by comparing the fitness values obtained by the corresponding particle X(t) and its previous one X(t−1). If the fitness value achieved by the corresponding particle is better than or equal to previous one, this means that the particle is able to maintain or enhance the performance. Thereby, the particle shall search globally around the neighbours to find more promising regions. By this way, the diversity of swarm can be improved. In the exploration phase, the particle updates its velocity and position as below: where R 3 and R 4 are two vectors randomly distributed in [0,1], and X m is the mean position of the current swarm.

Exploitation phase
On the other side, if the fitness value achieved by the corresponding particle is worse than its previous one, this indicates that the particle might be facing difficulty in finding the optimal solution. Thus, the particle shall search locally around the current best solutions and select the best solutions. In the exploitation phase, the particle updates its velocity and position as follows: where R 5 and R 6 are two vectors randomly distributed in [0,1], and X gb represents the mean position of global best particles over the course of the iterations. Instead of moving toward gbest, the mean position of gbest is less likely to introduce a bias toward the particular particle, which can improve the diversity of swarm in local search.

Adaptive inertia weight
Inertia weight is another key parameter that can substantially affect the performance of COPSO in FS. Generally speaking, a smaller value of inertia weight promotes the particle to exploit the best solutions. On the contrary, a larger value of inertia weight allows the algorithms to give more focus on exploration (Jiao et al., 2008). In COPSO, a conditional strategy is used to manipulate the exploration and exploitation behaviour. Thereby, an adaptive inertia weight is proposed, and it is defined as follows: where w is the inertia weight, R 7 and R 8 are two random numbers distributed in [0,1]. An illustration of adaptive inertia weight is demonstrated in Figure 4. In the exploration phase, the inertia weight was randomly generated in the ranges of 0.5 and 1, which encouraged the particle to search globally on the search space. For the exploitation phase, the inertia weight was allocated between 0 and 0.5, which enabled the particle to search locally around the promising regions. The utilisation of the adaptive inertia weight scheme promotes a well stable balance between local search and global search. Algorithm 2 presents the pseudocode of COPSO.

Computational complexity
The computational complexity of the COPSO mainly depends on the complexity of OBL for initialisation (OBL1), OBL for gbest (OBL2), and conditional strategy (CS). To sum up, the complexity of the proposed approach is given by Compute the inertia weight as shown in (11) // Condition: Exploration phase // 8) if F(X i ) better than or equal to Fp(X i ) 9) Update the velocity of particle using (7)  10) Update the position of particle as shown in (9) // Condition: Exploitation phase // 11) else if F(X i ) worse than Fp(X i ) 12) Update the velocity of particle using (10)  13) Update the position of particle as shown in (12)  14) end if 15) Evaluate fitness value of new particle, F(X i new ) 16) Update pbest i and gbest 17) end for 18) Compute the opposite solution of gbest using (5)  19) Update gbest if newly generated solution is better // Update previous fitness // 20) Store Fp(X) = F(X) 21) end for Output:Global best solution where N denotes the number of particles, D is the dimension size, T refers to the maximum number of iterations, and C denotes the cost of fitness function.

Feature selection using proposed method
This study proposes the COPSO to handle the FS problem in classification tasks. In fact, FS is a challenging combinatorial optimisation problem. The number of possible solutions increases exponentially with the number of dimensions (number of features). Let assume a dataset with D features, and the possible combinations of features will be 2 D , which is difficult to analyze by using the exhaustive search strategy (Nemati et al., 2009). Therefore, the proposed COPSO is used to evaluate the best combination of significant features for classification tasks.
In the proposed approach, the solutions are presented in binary form, in which "1" denotes the selected features and "0" represents the unselected features. Figure 5 illustrates the sample solution with ten features. It can be observed that the total number of five features (3rd, 4th, 7th, 8th, and 9th features) has been chosen in this sample solution.
Generally speaking, FS consists of two objectives, which are high classification performance and minimal feature size. In this framework, a fitness function that considers both objectives are employed as: where |S| is the length of feature subset, |C| is the total number of features, ER is the error rate, and it can be defined as the ratio of the number of wrongly classified instances to the total number of instances. The parameters α and β are the weight vectors to control the importance of classification performance and feature size, where the summation of α and β is equal to 1.

Results and discussions
This section consists of four sub-sections. The first sub-section provides the details of 24 used datasets. The second sub-section presents the comparison algorithms and evaluation metrics. The third sub-section shows the experimental results. The final sub-section discusses the findings of the experiment.

Experimental data
This sub-section validates the performance of COPSO in several real-world problems. Twenty-four datasets obtained from (UCI Machine Learning Repository, n.d.) and (Datasets | Feature Selection @ ASU, n.d.) are used to validate the performance of COPSO. Table 1 tabulates the summary of these datasets. From Table 1, the datasets with various numbers of features (from low to high dimensions) were chosen to inspect the performance of COPSO.

Comparison algorithms and evaluation metrics
To evaluate the efficacy of COPSO, the opposition based PSO (OPSO), GA, and the other seven metaheuristics include the binary particle swarm optimization (BPSO) (Kennedy & Eberhart, 1997), moth flame optimization (MFO) (Mirjalili, 2015), multi-verse optimizer (MVO) (Mirjalili et al., 2016), generalized normal distribution optimization (GNDO) , and pathfinder algorithm (PFA) (Yapici & Cetinkaya, 2019), opposition based sine cosine algorithm (OBSCA) (Abd Elaziz et al., 2017), and improved salp swarm algorithm (ISSA-OBL) (Tubishat et al., 2020) are selected for performance comparison. Table 2 outlines parameter settings of utilised methods. The numbers of solutions and maximum iterations are set at 10 and 100 to ensure the fair comparison. The total number of dimensions (D) is equal to the number of features in the dataset. For wrapper-based FS, the k-nearest neighbour (KNN, k = 5) classifier is adopted as the learning algorithm to calculate the fitness value of each solution. The KNN is chosen because of its fast processing speed, easy implementation, and promising performance in previous work (Emary et al., 2016).  For each individual dataset, the data is partitioned into training and testing sets with the ratio of 7:3. In the FS phase, the stratified 10-fold cross-validation manner is employed to assess the performance of the proposed approach. In this method, the dataset set is randomly separated into 10 equal parts. Each part is employed as the validation set in succession, whereas the remaining parts (9 parts) are adopted to train the classifier. According to (Ouadfel & Abd Elaziz, 2020), the α is set at 0.9. For each algorithm, the experiment is repeated for 20 runs to obtain meaningful statistical results. Finally, the measurements achieved from all the evaluations are recorded, and their averages are presented.

Experimental results
Six evaluation metrics, including the mean fitness, standard deviation of fitness, validation accuracy, testing accuracy, number of selected features, and computational time, are calculated to measure the effectiveness of proposed COPSO. All the simulation and analysis are conducted using MATLAB 2021 in a computer with 2.90 GHz CPU and 16.0GB RAM.  Figure 6 depicts the results of the convergence curve. As can be seen, COPSO yielded promising performance for most datasets. In comparison with other algorithms, COPSO can usually converge faster to find an optimal solution. Besides, COPSO achieved very good diversity. The observed improvement in FS problems is attributed to OBL to provide highquality solutions that enhance the convergence of the algorithm. As compared to OPSO, COPSO can often perform the search on more promising regions. This is mainly due to the proper balance between exploration and exploitation contributed by the conditional strategy, which properly adjusts the local search and global search exceedingly.
Tables 3 and 4 list the mean fitness and standard deviation of fitness values. Successively, COPSO achieved the lowest mean fitness in most cases. These results imply that the COPSO comprised of high potential in searching the global optimal solution, thus leading to superior performance. The foremost cause of this improved efficacy of the COPSO is that it utilises the OBL scheme. Hence, COPSO can effectively improve the quality of initial solutions and accelerate the convergence rate. Based on the result obtained in Table 3, the optimal mean fitness value is obtained by COPSO (21 datasets). In terms of robustness and consistency, COPSO can often offer highly consistent results due to smaller STD values. As such, COPSO utilises conditional and OBL strategies, which significantly improves the global search and local search capabilities. Table 5 presents the result of the validation accuracy. Inspecting the results, COPSO contributed the highest validation accuracy in 15 datasets. Among the comparative algorithms, COPSO scored the highest average accuracies in most cases. The result of testing accuracy is shown in Figure 7. Successively, COPSO achieved the highest testing accuracy in many datasets. In comparison with the other nine algorithms, COPSO was highly    capable of selecting the subset of significant features, thus resulting in optimal classification performance. Table 6 presents the result of the number of selected features. According to findings, COPSO perceived the smallest average number of selected features in most cases (14 datasets). As compared to OPSO, the COPSO can often select fewer features in the process of evaluation. The foremost cause for the improved efficiency of the COPSO is that it could maintain a well stable balance between local search and global search when dealing with FS problems. Table 7 presents the experimental result of computational time. As can be seen, the computation time consumed by COPSO was competitive. On the one hand, the GNDO is found to be the slowest algorithm.  Musk 1 The Wilcoxon signed-rank test with 95% confidence level is used to inspect the fitness values obtained by COPSO algorithm. In this statistical test, the performances of two different algorithms are significantly different if the p-value is less than 0.05; otherwise, the performances of two different algorithms are similar. The result of the Wilcoxon test is demonstrated in Table 8. From Table 8, the performance of COPSO was significantly better than other algorithms for most of the datasets. The results again prove the efficacy of the COSPO in the present work. Based on the results obtained, it can be concluded that COPSO is a useful FS tool.

Discussions
From the empirical result and analysis, the proposed COPSO was shown to be a reliable and powerful method for FS problems. According to results, the COPSO was able to produce an initial population of high-quality solutions. These quality solutions accelerated the convergence behaviour of the COPSO algorithm. In comparison with other conventional methods, COPSO was more capable of finding the average minimum during the search process. The experimental results obtained in Table 3 supported this argument. Taking TOX_171 as example, COPSO can search for the nearly optimal solution faster and overtook other algorithms in FS. From an optimisation perspective, COPSO not only finds the optimal solution effectively, but also offers a good convergence rate.
As compared to OPSO, COPSO has retained the optimal mean fitness value and highest validation accuracy in 23 and 20 datasets, respectively. For feature size, COPSO can often maintain a small subset of significant features, thereby improving the performance of the learning model. Also, the features chosen by COPSO were able to contribute to the optimal testing accuracy. In terms of convergence rate, COPSO can explore the feature space effectively and accelerate to the global best optimum. The results affirm the supremacy of COPSO in providing higher accuracies while selecting a smaller number of features.
Several observations can be made on the superiority of the COPSO method. Firstly, the OBL assists the algorithm in creating a set of high-quality initial solutions. Moreover, the OBL is applied to enhance the gbest in each iteration, which is beneficial in escaping the local optimal. Secondly, the conditional strategy enables the particles to make the search decisions based on their previous experiences, which helps the particles to decide whether to explore or exploit in the dynamic condition. This strategy is also associated with an adaptive inertia weight to maintain the well stable balance between exploration and exploitation. With the conditional strategy, the particles are highly capable of exploring and exploiting the promising regions over the feature space. Thanks to OBL and conditional strategy, the superiority of COPSO in avoiding the local optimal and improving the search capability can be ensured. Hence, COPSO can often contribute to the optimal performance when applied to FS problems.
Even though the performance of COPSO is superior, it also has some limitations. Firstly, the conditional strategy generated the inertia weight randomly for both exploitation and exploration conditions. This randomness may limit the search tendency of the COPSO algorithm. Secondly, the controlling parameters c 1 and c 2 are set according to the literature. These parameter settings are commonly used in the PSO algorithm. However, the parameter setting of COPSO can be further investigated for improving the performance of the algorithm in other applications.

Conclusion
In this paper, a conditional opposition-based particle swarm optimization (COPSO) was proposed for FS problems. The proposed COPSO utilised OBL to evolve the quality of the initial solutions and global best solution, thus improving the convergence rate of the algorithm. In addition, the conditional strategy assisted COPSO in balancing the exploration and exploitation tendency, which greatly increased the global search and local search abilities. By making full use of these mechanisms, COPSO was highly capable of escaping the local optima, and it could further enhance the efficacy of the algorithm in FS problems. The performance of the proposed COPSO was tested using 24 benchmark datasets, and the result was compared with the other nine FS algorithms. The comprehensive experimental results showed the supremacy of COPSO not only at producing high classification accuracy but also in minimal number of features.
Future work can centralise on the effectiveness of the COPSO in various applications such as numerical optimisation, welded beam design, and optimised support vector machine. Moreover, the concept and idea of conditional strategy can be also implemented into other swarm intelligence algorithms to maintain a well stable balance between exploration and exploitation. The applications of COPSO in different fields are worthy of investigating due to the black-box nature of this algorithm.

Disclosure statement
No potential conflict of interest was reported by the author(s).

Ethical approval
This article does not contain any studies with human participants or animals performed by any of the authors.