1 简介
人工神经网络的最大缺点是训练时间太长从而限制其实时应用范围,近年来,极限学习机(Extreme Learning Machine, ELM)的提出使得前馈神经网络的训练时间大大缩短,然而当原始数据混杂入大量噪声变量时,或者当输入数据维度非常高时,极限学习机算法的综合性能会受到很大的影响.深度学习算法的核心是特征映射,它能够摒除原始数据中的噪声,并且当向低维度空间进行映射时,能够很好的起到对数据降维的作用,因此我们思考利用深度学习的优势特性来弥补极限学习机的弱势特性从而改善极限学习机的性能.为了进一步提升DELM预测精度,本文采用天鹰算法进一步优化DELM超参数,仿真结果表明,改进算法的预测精度更高。
2 部分代码
%_______________________________________________________________________________________%
% Aquila Optimizer (AO) source codes (version 1.0) %
% %
% Developed in MATLAB R2015a (7.13) %
% Author and programmer: %
% Abualigah, L, Yousri, D, Abd Elaziz, M, Ewees, A, Al-qaness, M, Gandomi, A. %
% e-Mail: Aligah.2020@gmail.com (Laith Abualigah) %
% Homepage: %
% 1- https://scholar.google.com/citations?user=39g8fyoAAAAJ&hl=en %
% 2- https://www.researchgate.net/profile/Laith_Abualigah %
% %
% Main paper: %
%_____________Aquila Optimizer: A novel meta-heuristic optimization algorithm___________%
%_______________________________________________________________________________________%
% Abualigah, L, Yousri, D, Abd Elaziz, M, Ewees, A, Al-qaness, M, Gandomi, A. (2021).
% Aquila Optimizer: A novel meta-heuristic optimization algorithm.
% Computers & Industrial Engineering.
%_______________________________________________________________________________________%
function [Best_FF,Best_P,conv]=AO(N,T,LB,UB,Dim,F_obj)
Best_P=zeros(1,Dim);
Best_FF=inf;
X=initialization(N,Dim,UB,LB);
Xnew=X;
Ffun=zeros(1,size(X,1));
Ffun_new=zeros(1,size(Xnew,1));
t=1;
alpha=0.1;
delta=0.1;
QF=t^((2*rand()-1)/(1-T)^2); % Eq. (15)
%-------------------------------------------------------------------------------------
for i=1:size(X,1)
%-------------------------------------------------------------------------------------
if t<=(2/3)*T
if rand <0.5
Xnew(i,:)=Best_P(1,:)*(1-t/T)+(mean(X(i,:))-Best_P(1,:))*rand(); % Eq. (3) and Eq. (4)
Ffun_new(1,i)=F_obj(Xnew(i,:));
if Ffun_new(1,i)<Ffun(1,i)
X(i,:)=Xnew(i,:);
Ffun(1,i)=Ffun_new(1,i);
end
else
%-------------------------------------------------------------------------------------
Xnew(i,:)=Best_P(1,:).*Levy(Dim)+X((floor(N*rand()+1)),:)+(y-x)*rand; % Eq. (5)
Ffun_new(1,i)=F_obj(Xnew(i,:));
if Ffun_new(1,i)<Ffun(1,i)
X(i,:)=Xnew(i,:);
Ffun(1,i)=Ffun_new(1,i);
end
end
%-------------------------------------------------------------------------------------
else
if rand<0.5
Xnew(i,:)=(Best_P(1,:)-mean(X))*alpha-rand+((UB-LB)*rand+LB)*delta; % Eq. (13)
Ffun_new(1,i)=F_obj(Xnew(i,:));
if Ffun_new(1,i)<Ffun(1,i)
X(i,:)=Xnew(i,:);
Ffun(1,i)=Ffun_new(1,i);
end
else
%-------------------------------------------------------------------------------------
Xnew(i,:)=QF*Best_P(1,:)-(G2*X(i,:)*rand)-G1.*Levy(Dim)+rand*G2; % Eq. (14)
Ffun_new(1,i)=F_obj(Xnew(i,:));
if Ffun_new(1,i)<Ffun(1,i)
X(i,:)=Xnew(i,:);
Ffun(1,i)=Ffun_new(1,i);
end
end
end
end
%-------------------------------------------------------------------------------------
if mod(t,100)==0
display(['At iteration ', num2str(t), ' the best solution fitness is ', num2str(Best_FF)]);
end
conv(t)=Best_FF;
t=t+1;
end
end
function o=Levy(d)
beta=1.5;
sigma=(gamma(1+beta)*sin(pi*beta/2)/(gamma((1+beta)/2)*beta*2^((beta-1)/2)))^(1/beta);
u=randn(1,d)*sigma;v=randn(1,d);step=u./abs(v).^(1/beta);
o=step;
end
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
- 13.
- 14.
- 15.
- 16.
- 17.
- 18.
- 19.
- 20.
- 21.
- 22.
- 23.
- 24.
- 25.
- 26.
- 27.
- 28.
- 29.
- 30.
- 31.
- 32.
- 33.
- 34.
- 35.
- 36.
- 37.
- 38.
- 39.
- 40.
- 41.
- 42.
- 43.
- 44.
- 45.
- 46.
- 47.
- 48.
- 49.
- 50.
- 51.
- 52.
- 53.
- 54.
- 55.
- 56.
- 57.
- 58.
- 59.
- 60.
- 61.
- 62.
- 63.
- 64.
- 65.
- 66.
- 67.
- 68.
- 69.
- 70.
- 71.
- 72.
- 73.
- 74.
- 75.
- 76.
- 77.
- 78.
- 79.
- 80.
- 81.
- 82.
- 83.
3 仿真结果
编辑
编辑
4 参考文献
[1]李国龙, 陈孝勇, 李喆裕,等. 采用天鹰优化卷积神经网络的精密数控机床主轴热误差建模.
博主简介:擅长智能优化算法、神经网络预测、信号处理、元胞自动机、图像处理、路径规划、无人机等多种领域的Matlab仿真,相关matlab代码问题可私信交流。
编辑