0
点赞
收藏
分享

微信扫一扫

基于粒子群优化神经网络(Matlab代码实现)


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



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



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

目录

​​💥1 概述​​

​​📚2 运行结果​​

​​🎉3 参考文献​​

​​🌈4 Matlab代码实现​​


💥1 概述

本文使用 PSO 算法更新隐藏层和输出层的权重和偏差。

📚2 运行结果

基于粒子群优化神经网络(Matlab代码实现)_粒子群优化神经网络

部分代码:

function NMSE_calc = 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
NMSE_calc = 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]Selva (2022). particle swarm optimized Neural Network. 

​​🌈​​4 Matlab代码实现

举报

相关推荐

0 条评论