
MATLAB神经网络编程实例(数学建模)
5星
- 浏览量: 0
- 大小:None
- 文件类型:None
简介:
本书通过丰富的实例讲解如何使用MATLAB进行神经网络编程,并应用于数学建模问题中,适合需要利用神经网络解决复杂数据模式识别和预测任务的研究者。
在使用 MATLAB 进行数学建模中的 BP 神经网络预测问题时,可以参考以下源程序:
```matlab
net = newff(Pr,[6,1],{tansig,purelin},trainlm);
net.trainParam.epochs = 500;
net.trainParam.goal = 0.001;
net.trainParam.show = 1;
net.trainParam.lr = 0.05;
net = train(net,p,T);
```
这段代码定义了一个具有两层的 BP 神经网络,其中输入层与隐藏层之间使用了 tansig 激活函数,而输出层则采用了线性激活函数 purelin。训练算法采用的是 Levenberg-Marquardt(trainlm)。此外还设置了最大迭代次数为500次、目标误差为 0.001、显示频率为每次迭代以及学习率设为了 0.05。
全部评论 (0)
还没有任何评论哟~


