Skip to main content
. 2024 Nov 22;16(23):3913. doi: 10.3390/cancers16233913
Algorithm 1: Hybrid filter and differential evolution-based feature selection
Input: F: Original feature set, and P: Size of population
Output: SF: The optimal selected features
Begin
1 Compute scores of the features using Filter methods: Information gain (IG), information gain ratio (IGR), correlation (CR), Gini index (GIND), Relief (RELIEF) and Chi-squared (CHSQR)
2 Do ranking of all features in F based on the scores computed by Filter methods
3 Reduce dimension of training data by selecting only the top 5% of ranked features
4 Set Crossover rate, maximum number of generations Max_t, the generation counter t = 0
5 Generate and initialize P individuals of population (feature subset solutions)
6 While t < Max_t and Stopping criterion is not satisfied Do
7  t = t + 1
8  Compute the fitness of individuals using misclassification rate
9  Best individual = Evaluate the fitness of individuals
10 For each individual Xi Do
11   Choose three individuals Xr1, Xr2, Xr3 randomly
  where r1r2r3i
12   Generate a mutant solution Vi using Equations (9) and (10)
13   Generate a trial vector Ui using Equation (11)
14   Evaluate fitness values of Xi and Ui
15   If fitness of Ui is better than fitness of Xi
16         Xi is replaced with Ui in the population and then
        Ui used for the next generation
17    Else
18      Xi is kept for next generation
19    End if
20 End For
21 End While
22 Extract the optimal selected features from the individual with the best fitness value
23 Return the optimal features SF
24 End Algorithm