# 【FNN预测】基于粒子群算法结合引力搜索算法优化前向反馈神经网络FNN实现数据回归预测附matlab代码

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

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

🍊个人信条：格物致知。

## ⛄ 部分代码

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

% S. Mirjalili, S. Z. Mohd Hashim, and H. Moradian Sardroudi, "Training

%feedforward neural networks using hybrid particle swarm optimization and

%gravitational search algorithm," Applied Mathematics and Computation,

%vol. 218, pp. 11125-11137, 2012.

%The paper of the PSOGSA algorithm utilized as the trainer:

%S. Mirjalili and S. Z. Mohd Hashim, "A New Hybrid PSOGSA Algorithm for

%Function Optimization," in International Conference on Computer and Information

%Application?ICCIA 2010), 2010, pp. 374-377.

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

function o=My_FNN(Ino,Hno,Ono,W,B,x1,x2,x3,x4)

h=zeros(1,Hno);

o=zeros(1,Ono);

for i=1:Hno

h(i)=My_sigmoid(x1*W(i)+x2*W(Hno+i)+x3*W(2*Hno+i)+x4*W(3*Hno+i)+B(i));

end

k=3;

for i=1:Ono

k=k+1;

for j=1:Hno

o(i)=o(i)+(h(j)*W(k*Hno+j));

end

end

for i=1:Ono

o(i)=My_sigmoid(o(i)+B(Hno+i));

end

## ⛄ 参考文献

S. Mirjalili, S. Z. Mohd Hashim, and H. Moradian Sardroudi, "Training feedforward neural networks using hybrid particle swarm optimization and gravitational search algorithm," Applied Mathematics and Computation, vol. 218, pp. 11125-11137, 2012.

## ⛳️ 完整代码

##### ❤️ 关注我领取海量matlab电子书和数学建模资料

|
6天前
|

【排序】数据结构——排序算法概念及代码详解（插入、冒泡、快速、希尔）
【排序】数据结构——排序算法概念及代码详解（插入、冒泡、快速、希尔）
12 1
|
3天前
|

|
6天前
|

12 0
|
2天前
|

ANC主动降噪理论及Matlab代码实现
ANC主动降噪理论及Matlab代码实现
19 2
|
1月前
|

43 1
|
1月前

82 1
|
1月前
|

29 1
|
1月前
|
Serverless

25 1
|
1月前
|

28 1
|
1月前
|

34 1