Skip to main content
. 2022 Nov 19;12(11):2870. doi: 10.3390/diagnostics12112870
Algorithm 1: Pseudocode BPSO in Feature Selection.
Input: n—number of particles (swarm size);
   T—number of iteration;
   nVar—number of variables;
   Objective function;
Output:  Relevant features
1.   Start
2.   Initialize parameters of BPSO
3.   Initialize the swarm
4.   Repeat
5.   For each particle Do
6.   Evaluate particle’s fitness; (xbest)
7.   Update particle’s neighborhood best position; (gbest)
8.   End
9.   For each particle Do
10.    Update the particle’s velocity;
11.    Update the particle’s position;
12.    End
13.    Until the stopping condition is true;
14.    End