ICEEMDAN-IMPA-BiLSTM功率/风速预测 基于改进的自适应经验模态分解+改进海洋捕食者算法+双向长短期记忆网络时间序列预测~组合预测
1.分解时避免了传统经验模态分解的一些固有缺陷,效果更佳,并通过改进的海洋捕食者算法对BiLSTM四个参数进行寻优,最后对每个分量建立BiLSTM模型进行预测后叠加集成,全新组合预测,出图多且精美~
2.改进点如下:
通过一个新的自适应参数来控制捕食者移动的步长,并使用非线性参数作为控制参数来平衡NMPA的探索和开发阶段,有效提高其搜索精度与收敛速度。
直接替换excel数据即可用 适合新手小白
附赠案例数据 可直接运行
function [modes,its]=iceemdan(x,Nstd,NR,MaxIter,SNRFlag)
x=x(:)';
desvio_x=std(x);
x=x/desvio_x;
modes=zeros(size(x));
temp=zeros(size(x));
aux=zeros(size(x));
iter=zeros(NR,round(log2(length(x))+5));
for i=1:NR
white_noise{i}=randn(size(x));%creates the noise realizations
end;
for i=1:NR
modes_white_noise{i}=emd(white_noise{i});%calculates the modes of white gaussian noise
end;
for i=1:NR %calculates the first mode
xi=x+Nstd*modes_white_noise{i}(1,:)/std(modes_white_noise{i}(1,:));
[temp, o, it]=emd(xi,'MAXMODES',1,'MAXITERATIONS',MaxIter);
temp=temp(1,:);
aux=aux+(xi-temp)/NR;
iter(i,1)=it;
end;
modes= x-aux; %saves the first mode
medias = aux;
k=1;
aux=zeros(size(x));
es_imf = min(size(emd(medias(end,:),'MAXMODES',1,'MAXITERATIONS',MaxIter)));
while es_imf>1 %calculates the rest of the modes
for i=1:NR
tamanio=size(modes_white_noise{i});
if tamanio(1)>=k+1
noise=modes_white_noise{i}(k+1,:);
if SNRFlag == 2
noise=noise/std(noise); %adjust the std of the noise
end;
noise=Nstd*noise;
try
[temp,o,it]=emd(medias(end,:)+std(medias(end,:))*noise,'MAXMODES',1,'MAXITERATIONS',MaxIter);
catch
it=0; disp('catch 1 '); disp(num2str(k))
temp=emd(medias(end,:)+std(medias(end,:))*noise,'MAXMODES',1,'MAXITERATIONS',MaxIter);
end;
temp=temp(end,:);
else
try
[temp, o, it]=emd(medias(end,:),'MAXMODES',1,'MAXITERATIONS',MaxIter);
catch
temp=emd(medias(end,:),'MAXMODES',1,'MAXITERATIONS',MaxIter);
it=0; disp('catch 2 sin ruido')
end;
temp=temp(end,:);
end;
aux=aux+temp/NR;
iter(i,k+1)=it;
end;
modes=[modes;medias(end,:)-aux];
medias = [medias;aux];
aux=zeros(size(x));
%--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[1] https://blog.csdn.net/article/details/126072792?spm=1001.2014.3001.5502
[2] https://blog.csdn.net/article/details/126044265?spm=1001.2014.3001.5502