Research Article
Selecting Optimal Feature Set in High-Dimensional Data by Swarm Search
Algorithm 1
Pseudocode for the WSA algorithm.
| Objective function f(x), x = (,…,)T | | Initialize the population of wolves, xi(i = 1, 2, …, W) | | Define and initialize parameters: | | r = radius of the visual range | | s = step size by which a wolf moves at a time | | α = velocity factor of wolf | | pa = a user-defined threshold [0..1], determines how frequently an enemy appears | | WHILE (t < generations && stopping criteria not met) | | FOR i = 1 : W // for each wolf | | Prey_new_food_initiatively(); | | Generate_new_location(); | | // check whether the next location suggested by the random number generator is new. If | | not, repeat generating random location. | | IF (dist(, ) < r && xj is better as f() < f()) | | xi moves towards xj // xj is a better than xi | | ELSE IF | | xi = Prey_new_food_passively; | | END IF | | Generate_new_location(); | | IF (rand ()> pa) | | xi = xi + rand () + v; // escape to a new pos. | | END IF | | END FOR | | END WHILE |
|