- This toolbox offers ant colony optimization method ( ACO )
- The
Main
file illustrates the example of how ACO can solve the feature selection problem using benchmark data-set
feat
: feature vector ( Instances x Features )label
: label vector ( Instances x 1 )N
: number of antsmax_Iter
: maximum number of iterationsalpha
: coefficient control taubeta
: coefficient control etatau
: initial taueta
: initial etarho
: pheromone
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;
tau = 1;
alpha = 1;
rho = 0.2;
beta = 0.1;
eta = 1;
% Ant Colony Optimization
[sFeat,Nf,Sf,curve] = jACO(feat,label,N,max_Iter,tau,eta,alpha,beta,rho,HO);
% Plot convergence curve
plot(1:max_Iter,curve);
xlabel('Number of Iterations');
ylabel('Fitness Value');
title('ACO'); grid on;
- MATLAB 2014 or above
- Statistics and Machine Learning Toolbox