分类预测 | Matlab实现BES-ELM秃鹰搜索算法优化极限学习机分类预测
目录
- 分类预测 | Matlab实现BES-ELM秃鹰搜索算法优化极限学习机分类预测
- 分类效果
- 基本描述
- 程序设计
- 参考资料
分类效果
基本描述
Matlab实现BES-ELM秃鹰搜索算法优化极限学习机分类预测(完整源码和数据)
1.自带数据为excel数据,多输入,单输出,多分类。
2.直接替换数据即可使用,保证程序可正常运行。
3.程序语言为matlab,程序可出分类效果图,混淆矩阵图
4.注意程序和数据放在一个文件夹。
程序设计
- 完整程序和数据获取方式(资源出直接下载):Matlab实现BES-ELM秃鹰搜索算法优化极限学习机分类预测。
function [BestSol Convergence_curve timep]=BES(nPop,MaxIt,low,high,dim,fobj)
%nPop: size of population
%MaxIt:number of iterations
%low, high : space of Decision variables
%dim : number of Decision variables
%fobj : funcation % paper citation : Alsattar, H. A., Zaidan, A. A., & Zaidan, B. B. (2020). Novel meta-heuristic bald eagle search optimisation algorithm. Artificial Intelligence Review, 53(3), 2237-2264.?
st=cputime;
% Initialize Best Solution
BestSol.cost = inf;
for i=1:nPoppop.pos(i,:) = low+(high-low).*rand(1,dim);pop.cost(i)=fobj(pop.pos(i,:));if pop.cost(i) < BestSol.costBestSol.pos = pop.pos(i,:);BestSol.cost = pop.cost(i);end
enddisp(num2str([0 BestSol.cost]))
for t=1:MaxIt%% 1- select_space [pop BestSol s1(t)]=select_space(fobj,pop,nPop,BestSol,low,high,dim);%% 2- search in space[pop BestSol s2(t)]=search_space(fobj,pop,BestSol,nPop,low,high);%% 3- swoop[pop BestSol s3(t)]=swoop(fobj,pop,BestSol,nPop,low,high);Convergence_curve(t)=BestSol.cost;disp(num2str([t BestSol.cost]))ed=cputime;timep=ed-st;
end
function [pop BestSol s1]=select_space(fobj,pop,npop,BestSol,low,high,dim)
Mean=mean(pop.pos);
% Empty Structure for Individuals
empty_individual.pos = [];
empty_individual.cost = [];
lm= 2;
s1=0;
for i=1:npopnewsol=empty_individual;newsol.pos= BestSol.pos+ lm*rand(1,dim).*(Mean - pop.pos(i,:));newsol.pos = max(newsol.pos, low);newsol.pos = min(newsol.pos, high);newsol.cost=fobj(newsol.pos);if newsol.cost<pop.cost(i)pop.pos(i,:) = newsol.pos;pop.cost(i)= newsol.cost;s1=s1+1;if pop.cost(i) < BestSol.costBestSol.pos= pop.pos(i,:);BestSol.cost=pop.cost(i); endend
end
参考资料
[1] https://blog.csdn.net/kjm13182345320/article/details/129036772?spm=1001.2014.3001.5502
[2] https://blog.csdn.net/kjm13182345320/article/details/128690229