多目标优化问题的研究概述(Matlab代码实现)

本文涉及的产品
MSE Nacos/ZooKeeper 企业版试用,1600元额度,限量50份
服务治理 MSE Sentinel/OpenSergo,Agent数量 不受限
注册配置 MSE Nacos/ZooKeeper,182元/月
简介: 多目标优化问题的研究概述(Matlab代码实现)

🍁🥬🕒摘要🕒🥬🍁

本次介绍作为IDE和代码格式的聚类、回归、图像量化、图像分割、并行机器调度(PMS)、旅行商问题(TSP)和装箱问题(BPP)的七个应用。

✨🔎⚡部分运行结果⚡🔎✨

💂♨️👨‍🎓Matlab代码👨‍🎓♨️💂

% warning('off');
clear;
% Data=load("Data.csv");
% Inputs=Data(:,1:end-1);
% Targets=Data(:,end);
%% Input Model 
% Display uigetfile dialog
filterspec = {'*.csv'};
[f, p] = uigetfile(filterspec);
fileadd=fullfile(p,f);
filecon=load(fileadd);
Inputs=filecon(:,1:end-1);
Targets=filecon(:,end);
%% Learning 
n = 9; % Neurons
%----------------------------------------
% 'trainlm'        Levenberg-Marquardt
% 'trainbr'     Bayesian Regularization (good)
% 'trainrp'      Resilient Backpropagation
% 'traincgf'    Fletcher-Powell Conjugate Gradient
% 'trainoss'    One Step Secant (good)
% 'traingd'     Gradient Descent
% Creating the NN ----------------------------
net = feedforwardnet(n,'trainoss');
%---------------------------------------------
% configure the neural network for this dataset
[net tr]= train(net,Inputs', Targets');
perf = perform(net,Inputs, Targets); % mse
% Current NN Weights and Bias
Weights_Bias = getwb(net);
% MSE Error for Current NN
Outputs=net(Inputs');
Outputs=Outputs';
% Final MSE Error and Correlation Coefficients (CC)
Err_MSE=mse(Targets,Outputs);
CC1= corrcoef(Targets,Outputs);
CC1= CC1(1,2);
%-----------------------------------------------------
%% Nature Inspired Regression
% Create Handle for Error
h = @(x) MSEHandle(x, net, Inputs', Targets');
tic
sizenn=size(Inputs);sizenn=sizenn(1,1);
%-----------------------------------------
%% Please select
MaxIt = 5;       % Maximum Number of Iterations
nPop = 5;        % Population Size 
[x,err,BestCost] = hs(h, sizenn*n+n+n+1,MaxIt,nPop);
% Plot ITR
% figure;
plot(BestCost,'k', 'LineWidth', 2);
xlabel('ITR');
ylabel('Cost Value');
ax = gca; 
ax.FontSize = 14; 
ax.FontWeight='bold';
set(gca,'Color','c')
grid on;
%%-------------------------------------------------------------------------
net = setwb(net, x');
% Optimized NN Weights and Bias
getwb(net);
% Error for Optimized NN
Outputs2=net(Inputs');
Outputs2=Outputs2';
% Final MSE Error and Correlation Coefficients (CC)
Err_MSE2=mse(Targets,Outputs2);
CC2= corrcoef(Targets,Outputs2);
CC2= CC2(1,2);
%% Plot Regression
f = figure;  
f.Position = [100 100 700 550]; 
% Metaheuristics
subplot(3,1,1)
[population3,gof3] = fit(Targets,Outputs2,'poly3');
plot(Targets,Outputs2,'o',...
'LineWidth',1,...
'MarkerSize',8,...
'MarkerEdgeColor','g',...
'MarkerFaceColor',[0.9,0.3,0.1]);
title(['R =  ' num2str(1-gof3.rmse)],['MSE =  ' num2str(Err_MSE2)]); 
hold on
plot(population3,'b-','predobs');
xlabel('Targets');ylabel('Outputs');   grid on;
ax = gca; 
ax.FontSize = 12; ax.LineWidth=2;
% legend({'Regression'},'FontSize',12,'TextColor','blue');hold off
subplot(3,1,2)
% Error
Errors=Targets-Outputs2;
ErrorMean=mean(Errors);
ErrorStd=std(Errors);
subplot(3,1,2);
plot(Targets,'m');hold on;
plot(Outputs2,'k');legend('Target','Output');
title('Training Part');xlabel('Sample Index');grid on;
subplot(3,1,3);
h=histfit(Errors, 50);
h(1).FaceColor = [.3 .8 0.3];
title(['Train Error Mean =    ' num2str(ErrorMean) '   ,' ...
    '   Train Error STD =    ' num2str(ErrorStd)]);grid on;
% Correlation Coefficients
% fprintf('Normal Correlation Coefficients Is =  %0.4f.\n',CC1);
fprintf('New Correlation Coefficients Is =  %0.4f.\n',CC2);
toc


📜📢🌈参考文献🌈📢📜

[1]公茂果,焦李成,杨咚咚,马文萍.进化多目标优化算法研究[J].软件学报,2009,20(02):271-289.


[2]肖晓伟,肖迪,林锦国,肖玉峰.多目标优化问题的研究概述[J].计算机应用研究,2011,28(03):805-808+827.


相关文章
|
9天前
|
存储 编解码 算法
【多光谱滤波器阵列设计的最优球体填充】使用MSFA设计方法进行各种重建算法时,图像质量可以提高至多2 dB,并在光谱相似性方面实现了显著提升(Matlab代码实现)
【多光谱滤波器阵列设计的最优球体填充】使用MSFA设计方法进行各种重建算法时,图像质量可以提高至多2 dB,并在光谱相似性方面实现了显著提升(Matlab代码实现)
|
9天前
|
机器学习/深度学习 传感器 算法
【高创新】基于优化的自适应差分导纳算法的改进最大功率点跟踪研究(Matlab代码实现)
【高创新】基于优化的自适应差分导纳算法的改进最大功率点跟踪研究(Matlab代码实现)
97 14
|
9天前
|
机器学习/深度学习 算法
【概率Copula分类器】实现d维阿基米德Copula相关的函数、HACs相关的函数研究(Matlab代码实现)
【概率Copula分类器】实现d维阿基米德Copula相关的函数、HACs相关的函数研究(Matlab代码实现)
|
9天前
|
机器学习/深度学习 传感器 算法
【裂纹检测】检测和标记图片中的裂缝(Matlab代码实现)
【裂纹检测】检测和标记图片中的裂缝(Matlab代码实现)
|
11天前
|
算法 计算机视觉
【MPDR & SMI】失配广义夹角随输入信噪比变化趋势、输出信干噪比随输入信噪比变化趋势研究(Matlab代码实现)
【MPDR & SMI】失配广义夹角随输入信噪比变化趋势、输出信干噪比随输入信噪比变化趋势研究(Matlab代码实现)
|
11天前
|
编解码 人工智能 算法
【采用BPSK或GMSK的Turbo码】MSK、GMSK调制二比特差分解调、turbo+BPSK、turbo+GMSK研究(Matlab代码实现)
【采用BPSK或GMSK的Turbo码】MSK、GMSK调制二比特差分解调、turbo+BPSK、turbo+GMSK研究(Matlab代码实现)
|
11天前
|
机器学习/深度学习 编解码 并行计算
【改进引导滤波器】各向异性引导滤波器,利用加权平均来实现最大扩散,同时保持图像中的强边缘,实现强各向异性滤波,同时保持原始引导滤波器的低低计算成本(Matlab代码实现)
【改进引导滤波器】各向异性引导滤波器,利用加权平均来实现最大扩散,同时保持图像中的强边缘,实现强各向异性滤波,同时保持原始引导滤波器的低低计算成本(Matlab代码实现)
|
11天前
|
机器学习/深度学习 传感器 边缘计算
【故障诊断】基于时滞反馈随机共振的增强型旋转电机故障诊断(Matlab代码实现)
【故障诊断】基于时滞反馈随机共振的增强型旋转电机故障诊断(Matlab代码实现)
|
11天前
|
传感器 机器学习/深度学习 算法
【UASNs、AUV】无人机自主水下传感网络中遗传算法的路径规划问题研究(Matlab代码实现)
【UASNs、AUV】无人机自主水下传感网络中遗传算法的路径规划问题研究(Matlab代码实现)
|
11天前
|
运维 算法
【故障诊断】基于最小熵反卷积、最大相关峰度反卷积和最大二阶环平稳盲反卷积等盲反卷积方法在机械故障诊断中的应用研究(Matlab代码实现)
【故障诊断】基于最小熵反卷积、最大相关峰度反卷积和最大二阶环平稳盲反卷积等盲反卷积方法在机械故障诊断中的应用研究(Matlab代码实现)

热门文章

最新文章