【预测模型-DELM分类】基于风驱动算法改进深度学习极限学习机实现数据分类附matlab代码

简介: 【预测模型-DELM分类】基于风驱动算法改进深度学习极限学习机实现数据分类附matlab代码
+关注继续查看

✅作者简介:热爱科研的Matlab仿真开发者,修心和技术同步精进,matlab项目合作可私信。

🍎个人主页:Matlab科研工作室

🍊个人信条:格物致知。

更多Matlab仿真内容点击👇

智能优化算法  神经网络预测 雷达通信 无线传感器

信号处理 图像处理 路径规划 元胞自动机 无人机

⛄ 内容介绍

人工时间的最大缺点是训练太长,因为它在应用神经网络的时间范围内,持续不断地限制神经网络,最大限度地限制学习机(Extreme Learning Machine)大量的噪声噪声,或者当输入数据时的维度算法非常高时,极限学习时的综合性能会受到极大的影响。进行空间映射时的有效对数据维的维度的预测,因此我们认为利用深度学习的预测精度来最大学习机的特性,可以很好地改善极限学习机的特性。本文采用风驱动算法的进一步优化DELM超参数,仿真结果改进,预测精度更高。

image

image

image

image

image

⛄ 部分代码


%-------------------------------------------------------------------------


tic;  

clear;  

close all;  

clc;  

format long g;

delete('WDOoutput.txt');  

delete('WDOpressure.txt');  

delete('WDOposition.txt');

fid=fopen('WDOoutput.txt','a');

%--------------------------------------------------------------


% User defined WDO parameters:

param.popsize = 20; % population size.

param.npar = 5; % Dimension of the problem.

param.maxit = 500; % Maximum number of iterations.

param.RT = 3; % RT coefficient.

param.g = 0.2; % gravitational constant.

param.alp = 0.4; % constants in the update eq.

param.c = 0.4; % coriolis effect.

maxV = 0.3; % maximum allowed speed.

dimMin =  -5; % Lower dimension boundary.

dimMax= 5; % Upper dimension boundary.

%---------------------------------------------------------------


% Initialize WDO population, position and velocity:

% Randomize population in the range of [-1, 1]:

pos = 2*(rand(param.popsize,param.npar)-0.5);

% Randomize velocity:

vel = maxV * 2 * (rand(param.popsize,param.npar)-0.5);  


%---------------------------------------------------------------


% Evaluate initial population: (Sphere Function)

for K=1:param.popsize,

x = (dimMax - dimMin) * ((pos(K,:)+1)./2) + dimMin;

     pres(K,:) = sum (x.^2);

end

%----------------------------------------------------------------


% Finding best air parcel in the initial population :

[globalpres,indx] = min(pres);

globalpos = pos(indx,:);

minpres(1) = min(pres); % minimum pressure

%-----------------------------------------------------------------


% Rank the air parcels:

[sorted_pres rank_ind] = sort(pres);

% Sort the air parcels:

pos = pos(rank_ind,:);

keepglob(1) = globalpres;

%-----------------------------------------------------------------


% Start iterations :

iter = 1;   % iteration counter

for ij = 2:param.maxit,

     % Update the velocity:

     for i=1:param.popsize

% choose random dimensions:

a = randperm(param.npar);        

% choose velocity based on random dimension:

     velot(i,:) = vel(i,a);

         vel(i,:) = (1-param.alp)*vel(i,:)-(param.g*pos(i,:))+ ...

    abs(1-1/i)*((globalpos-pos(i,:)).*param.RT)+ ...

    (param.c*velot(i,:)/i);

     end

    

         % Check velocity:

         vel = min(vel, maxV);

         vel = max(vel, -maxV);

% Update air parcel positions:

     pos = pos + vel;

         pos = min(pos, 1.0);

         pos = max(pos, -1.0); 

% Evaluate population: (Pressure)

for K=1:param.popsize,

x = (dimMax - dimMin) * ((pos(K,:)+1)./2) + dimMin;

     pres(K,:) = sum (x.^2);

end


     %----------------------------------------------------

     % Finding best particle in population

     [minpres,indx] = min(pres);

     minpos = pos(indx,:);            % min location for this iteration

     %----------------------------------------------------

     % Rank the air parcels:

     [sorted_pres rank_ind] = sort(pres);

     % Sort the air parcels position, velocity and pressure:

     pos = pos(rank_ind,:);

     vel = vel(rank_ind,:);

     pres = sorted_pres;  

    

     % Updating the global best:

     better = minpres < globalpres;

     if better

         globalpres = minpres             % initialize global minimum

         globalpos = minpos;

    end

% Keep a record of the progress:

     keepglob(ij) = globalpres;

     save WDOposition.txt pos -ascii -tabs;

end

%Save values to the final file.

     pressure = transpose(keepglob);

     save WDOpressure.txt pressure -ascii -tabs;

        

        % Plot the pressure function progress over iterations:

        semilogy(keepglob, 'k' ,'LineWidth',2)

        title(['Global Best Pressure is " ',num2str(keepglob(1,param.maxit)),' ".'])

        xlabel('Number of Iterations')

        ylabel('Global Pressure (i.e. fitness) in log scale')

        grid on

        xlim([0, param.maxit])

        

        

     %END

%-----------------------------------------------------


⛄ 运行结果

image

image

⛄ 参考文献

[1]吴丁杰, 温立书. 一种基于哈里斯鹰算法优化的核极限学习机[J]. 信息通信, 2021(034-011).

[2]马萌萌. 基于深度学习的极限学习机算法研究[D]. 中国海洋大学, 2016.

❤️ 关注我领取海量matlab电子书和数学建模资料
❤️部分理论引用网络文献,若有侵权联系博主删除


相关文章
|
4天前
|
机器学习/深度学习 传感器 算法
Matlab 基于PSO-LSTM-Attention做多特征输入单输出的预测模型
Matlab 基于PSO-LSTM-Attention做多特征输入单输出的预测模型
|
12天前
|
机器学习/深度学习 传感器 算法
【lssvm回归预测】基于变模态结合秃鹰算法优化最小二乘支持向量机VMD-BES-LSSVM实现数据预测模型(多输入单输出)含Matlab代码
【lssvm回归预测】基于变模态结合秃鹰算法优化最小二乘支持向量机VMD-BES-LSSVM实现数据预测模型(多输入单输出)含Matlab代码
|
1月前
|
算法
基于实时迭代的数值鲁棒NMPC双模稳定预测模型(Matlab代码实现)
基于实时迭代的数值鲁棒NMPC双模稳定预测模型(Matlab代码实现)
|
1月前
|
机器学习/深度学习 安全 算法
【光伏功率预测】基于EMD-PCA-LSTM的光伏功率预测模型(Matlab代码实现)
【光伏功率预测】基于EMD-PCA-LSTM的光伏功率预测模型(Matlab代码实现)
|
2月前
|
机器学习/深度学习 Oracle 关系型数据库
SCN时间序列预测模型详解(Matlab代码实现)
SCN时间序列预测模型详解(Matlab代码实现)
|
2月前
|
机器学习/深度学习 算法
基于粒子群优化算法的BP神经网络预测模型(Matlab代码实现)
基于粒子群优化算法的BP神经网络预测模型(Matlab代码实现)
|
2月前
|
机器学习/深度学习 算法 Serverless
基于萤火虫算法优化的BP神经网络预测模型(Matlab代码实现)
基于萤火虫算法优化的BP神经网络预测模型(Matlab代码实现)
|
2月前
|
机器学习/深度学习
【MATLAB第58期】基于MATLAB的PCA-Kmeans、PCA-LVQ与BP神经网络分类预测模型对比
【MATLAB第58期】基于MATLAB的PCA-Kmeans、PCA-LVQ与BP神经网络分类预测模型对比
【MATLAB第58期】基于MATLAB的PCA-Kmeans、PCA-LVQ与BP神经网络分类预测模型对比
|
2月前
|
机器学习/深度学习
【MATLAB第57期】基于MATLAB的双隐含层BP神经网络回归预测模型(无工具箱版本及工具箱版本对比)
因工具箱版本和无工具箱版本训练方法不同,以及有工具箱版本内置默认参数较为丰富 ,如连续验证最大失败数量、训练集再划分样本等等参数 ,且trainlm函数功能强大,用代码编写比较复杂。故有工具版计算结果较好,收敛速度较快,使用方便,而无工具箱版本则更能直观的观察数据变化以及能够更直观体现BP神经网络计算原理。
【MATLAB第57期】基于MATLAB的双隐含层BP神经网络回归预测模型(无工具箱版本及工具箱版本对比)
|
2月前
|
机器学习/深度学习 算法
【MATLAB第56期】#源码分享 | 基于MATLAB的机器学习算法单输入多输出分类预测模型思路(回归改分类)
因上一步骤进行了正常的回归预测,输出一般为小数点,且不是限定标签的数值。所以需要通过find函数,将回归预测的输出结果进行分段赋值。若涉及多隐含层,可修改[20,20,5]中的数字。前2个20代表两层隐含层的神经元数 ,后面的5为输出节点,根据本案例数据设置。输出分为五个指标,每个指标共4个评分维度,即【0 10 20 30】归一化区间可自行设置,默认[-1,1],本文采用[0,1]根据四舍五入的思路,如数据如果在5以下,则赋值为0,数据为1输入,5输出,总共482个样本。如果为[5,15),赋值为10…
【MATLAB第56期】#源码分享 | 基于MATLAB的机器学习算法单输入多输出分类预测模型思路(回归改分类)
相关产品
机器学习平台 PAI
印刷文字识别
视觉智能开放平台
推荐文章
更多