基于Jaya优化JAYA前馈神经网络FNN研究(Matlab代码实现)

👨‍🎓个人主页:研学社的博客 

💥💥💞💞欢迎来到本博客❤️❤️💥💥

🏆博主优势:🌞🌞🌞博客内容尽量做到思维缜密,逻辑清晰,为了方便读者。

⛳️座右铭:行百里者,半于九十。

📋📋📋本文目录如下:🎁🎁🎁

目录

💥1 概述

📚2 运行结果

🎉3 参考文献

🌈4 Matlab代码实现


💥1 概述

Jaya算法是目前最新的优化算法之一。算法开始时,首先随机生成包含一定数目个体的初始种
群,个体数目n可以根据问题的复杂程度而词整,仞炯种群中所有个体都含有一定数量的设计变量m,初始值生成公式如式(1)所示。

📚2 运行结果

 

部分代码:

%% 
[val,ind] = min(fopt);
Fes = pop*ind;
disp(['Optimum value = ',num2str(val,10)])
 figure;
 plot(fopt,'LineWidth', 2);
 xlabel('Itteration');
 ylabel('Best Cost');
 legend('JAYA');
 disp(' ' );
% Setting optimized weights and bias in network
net = setwb(net, Best');
% Denormalizaion and Prediction by JAYA_FNN
JAYA_FNN_Pred = ((net(XTest))' * mm) + mn;
YTest = (YTest * mm) + mn;
JAYA_FNN_Execution_Time_Seconds = toc 
% Plotting prediction results
figure;
plot(YTest,'LineWidth',2, 'Marker','diamond', 'MarkerSize',8);
hold on;
plot(FNN_Pred, 'LineWidth',2, 'Marker','x', 'MarkerSize',8);
plot(JAYA_FNN_Pred, 'LineWidth',2, 'Marker','pentagram', 'MarkerSize',8);
title('JAYA Optimization based Feed-Forward Neural Network');
xlabel('Time Interval');
ylabel('Values');
legend('Actual Values', 'FNN Predictions', 'JAYA-FNN Predictions');
hold off;
% Performance Evaluaion of FNN and JAYA-FNN
fprintf('Performance Evaluaion of FNN and JAYA-FNN using Normalized Root Mean Square Error \n');
NRMSE_FNN = (abs( sqrt( mean(mean((FNN_Pred - YTest).^2) )) )) / (max(YTest)-min(YTest))
NRMSE_JAYA_FNN = (abs( sqrt( mean(mean((JAYA_FNN_Pred - YTest).^2) ) ) )) / (max(YTest)-min(YTest))


% Objective Function for minimizing normalized mean square error of FNN by
% updation of nework's weights and biases
function [f] = NMSE(wb, net, input, target)
% wb is the weights and biases row vector obtained from the genetic algorithm.
% It must be transposed when transferring the weights and biases to the network net.
 net = setwb(net, wb');
% The net output matrix is given by net(input). The corresponding error matrix is given by
 error = target - net(input);
% The mean squared error normalized by the mean target variance is
 f = (mean(error.^2)/mean(var(target',1)));
% It is independent of the scale of the target components and related to the Rsquare statistic via
% Rsquare = 1 - NMSEcalc ( see Wikipedia)

🎉3 参考文献

部分理论来源于网络,如有侵权请联系删除。

[1]Wang S, Rao RV, Chen P, Zhang Y, Liu A, Wei L. Abnormal breast detection in mammogram images by feed-forward neural network trained by Jaya algorithm. Fundamenta Informaticae. 2017 Jan 1;151(1-4):191-211.

[2]周麟,郝仁杰,尤权圣.基于多层前馈神经网络算法的房价预测模型[J].中国集体经济,2022(23):42-44.

[3]王璞,俞长海,凌骐.基于Jaya-BP神经网络的混凝土坝参数反演[J].水力发电,2023,49(02):50-54+62.

[4]李秋红.基于改进粒子群算法的前馈神经网络识别用户窃电行为[J].电气技术,2022,23(11):44-48.

🌈4 Matlab代码实现

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

荔枝科研社

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值