Algorithm 3

HBBEPSO Algorithm

1:

Split the given data set into three equal sizes of training, validation and testing sets.

2:

Set the initial value of swarm size SS(N) and make the dimension D equal to the number of features in the data set.

3:

Set Acceleration constants c1 and c2, vmax,wmax,wmin, a, r, Qmin,Qmax and moxiter.

4:

Randomly initialize the population as x using Eq. (9) for each solution, the velocity vectors v as D dimensional zero vectors as in Eq. (10) and the frequency vectors Q as D dimensional zero vectors as in Eq. (3).

5:

Calculate fitness using Eq. (2) and make fitold = fitness.

6:

Set t := 0. {Counter initialization}

7:

Evaluate the fitness function for each of the solutions using the Eq. (2) and Assign the values for Pbest(using fitold information) and gbest. {The fitness function for feature selection}

8:

Run BBA algorithm as given in Algorithm 1 with initial velocity zero every time. {The bat velocity is instantaneous and is not a resultant from adding with EPSO velocity}.

9:

Update the positions but not the Pbest and gbest.

10:

^^^

11:

for(i = l; i < SS; i ++) do

12:

vi(t+1)=wvi(t)+c1ri1Pbesti(t)xi(t)+c2ri2gbest xi(t)

13:

end for{Update the velocities of Particles}

14:

for(i= l; i < SS, i + +) do

15:

for(j = l; j < D; j + +) do

16:

   if(v(i,j) > vmax) then

17:

    v(i,j) = vmax

18:

   end if

19:

   if(v(i,j) < -vmax) then

20:

    v(i,j) = -vmax

21:

   end if

22:

   S=11+ev(i,j)

23:

   if(rand < s) then

24:

   x(i, j) =1

25:

&emsp003B  else

26:

    x(i,j) = 0

27:

&emsp003B  end if

28:

end for

29:

end for

30:

t = t + 1 (Iteration counter is increasing}

31:

until(t <maxiter) {Termination criteria are satisfied}

32:

Produce the best solution gbest.

or Create an Account

Close subscription notice
Close access options