Research Article

An Automated Approach for Epilepsy Detection Based on Tunable Q-Wavelet and Firefly Feature Selection Algorithm

Algorithm 1

The pseudocode of the proposed feature reduction algorithm based on firefly optimization and SA.
Input: The features matrix
Output: The optimal solution
Initialize the firefly swam using a logistic chaotic map.
Evaluate each firefly using the fitness function f(x)
Select the best firefly and the worst one
while termination condition are not reached do
Declare an alternative leader firefly as , with a competitive fitness and located in different region.
Obtain an offspring solution using
for all (firefly and ) do
for all (firefly and ) do
if then
Enhance firefly using Equation (25) to obtain better offspring candidate firefly denoted
Replace firefly with the offspring
Move the firefly towards the neighboring and global optimal solutions using Equation (26)
end if
end for
end for
Update the worst solution
if then
end if
Rank all fireflies and update the best and worst solutions.
end while
return