- This toolbox offers a Whale Optimization Algorithm ( WOA ) method
- The
Main
script illustrates the example of how WOA can solve the feature selection problem using benchmark dataset
feat
: feature vector ( Instances x Features )label
: label vector ( Instances x 1 )N
: number of whalesmax_Iter
: maximum number of iterations
sFeat
: selected featuresSf
: selected feature indexNf
: number of selected featurescurve
: convergence curve
% Benchmark data set
load ionosphere.mat;
% Set 20% data as validation set
ho = 0.2;
% Hold-out method
HO = cvpartition(label,'HoldOut',ho);
% Parameter setting
N = 10;
max_Iter = 100;
% Whale Optimization Algorithm
[sFeat,Sf,Nf,curve] = jWOA(feat,label,N,max_Iter,HO);
% Accuracy
Acc = jKNN(sFeat,label,HO);
fprintf('\n Accuracy: %g %%',Acc);
% Plot convergence curve
plot(1:max_Iter,curve);
xlabel('Number of Iterations');
ylabel('Fitness Value');
title('WOA'); grid on;
- MATLAB 2014 or above
- Statistics and Machine Learning Toolbox
@article{too2021spatial,
title={Spatial bound whale optimization algorithm: an efficient high-dimensional feature selection approach},
author={Too, Jingwei and Mafarja, Majdi and Mirjalili, Seyedali},
journal={Neural Computing and Applications},
pages={1--22},
year={2021},
publisher={Springer}
}