Skip to main content
. 2019 Dec 3;19(23):5325. doi: 10.3390/s19235325
Algorithm 2 Genetic-Based Feature Selection Method
Input:F (number of features), G (number of generations), P (number of participants)
1: forf = 1 to F
2: Make a random population that all individuals have f ones
3: forg =1 to G
4: forp = 1 to P
5: Train the regressor on data of all participants except participant p
6: Calculate R2 error of the regressor on the participant p
7: end for
8: Fitness= average of R2 errors
9: Generating Mating pool
10: Cross over
11: Mutation
12: Elitism
13: Produce the new generation
14: end for
15: output best chromosome
16: end for