遵义住建局查询网站,系统门窗品牌10大品牌排行,新县住房和城乡规划建设网站,node怎么做网站大家好#xff0c;我是带我去滑雪#xff01; 神经网络投照是否存在反锁与记忆可以分为静态神经网络与动态神经网络。动态神经网络是指神经网络带有反做与记忆功能#xff0c;无论是局部反馈还是全局反锁。通过反馈与记忆#xff0c;神经网络能将前一时刻的数据保留#x… 大家好我是带我去滑雪 神经网络投照是否存在反锁与记忆可以分为静态神经网络与动态神经网络。动态神经网络是指神经网络带有反做与记忆功能无论是局部反馈还是全局反锁。通过反馈与记忆神经网络能将前一时刻的数据保留使其加人到下一时刻数据的计算使网络不仅具有动态性而且保留的系统信息也更加完整。动态神经网络有许多应用例如金融分析师用于分析某只股票、基金或者其他金融工具未来某时点的价格工程师用于预测最近一次可能的飞机引擎故障时间等可见动态神经网络在分析、仿真、系统监测与控制等领域有重要应用。根据动态神经网络实现系统动态的方法不同将之分为两类一类是回归神经网络它是由静态神经元和网络输出反馈构成的动态网络典型的有 NARX 回归神经网络;另一类是通过神经元反馈形成的神经网络如全回归神经网络、Elman 神经网络、PID神经网络等等。本期将动态网络应用于时间序列的预测中实现通过 NARX 动态神经网络对时问序列数据的建模仿真及效果评价。
目录
一、问题描述与模型建立
1问题描述
2模型建立
二、代码实现与结果分析
1建立非线性自回归模型
2数据准备工作
3训练函数、误差函数、绘图函数确定
3NARX神经网络模型
5结果分析 一、问题描述与模型建立
1问题描述 中和反应是化学反应中复分解反应的一种是指酸和破互相交换组分、生成盐和水的反应,在中和的过程中酸里的氢离子和碱中的氢氧根离子会结合成水。中和反应发生后最终产物的PH 值不一定是7。如果一强酸与强破参与中和反应其产物的PH则会是7。如强酸盐酸和强碱氢氧化钠发生中和反应,产生氣化钠和水。本案例使用 MATLAB 自带案例数据即给定两个酸碱溶液的流速来预测和反应过程后溶液的PH值。
2模型建立 数据使用两个含有2001 个监测点的时间序列数据。其中 PhInputs 为一个1×2001维的cell,代表了2001 个监测时间点酸碱溶液的流速。PhTargets 为 1×2001 维的cell,代表中和反应后溶液的pH 值。本研究的目的就是通过当前的酸碱溶液流速预测中和反应后溶液的pH 值大小。
二、代码实现与结果分析
1建立非线性自回归模型
load phdata
inputSeries phInputs;
targetSeries phTargets;%% 建立非线性自回归模型
inputDelays 1:2;
feedbackDelays 1:2;
hiddenLayerSize 10;
net narxnet(inputDelays,feedbackDelays,hiddenLayerSize);2数据准备工作
net.inputs{1}.processFcns {removeconstantrows,mapminmax};
net.inputs{2}.processFcns {removeconstantrows,mapminmax};%% 时间序列数据准备工作
[inputs,inputStates,layerStates,targets] preparets(net,inputSeries,{},targetSeries);%% 训练数据、验证数据、测试数据划分
net.divideFcn dividerand;
net.divideMode value;
net.divideParam.trainRatio 70/100;
net.divideParam.valRatio 15/100;
net.divideParam.testRatio 15/100;3训练函数、误差函数、绘图函数确定
net.trainFcn trainlm; % Levenberg-Marquardtnet.performFcn mse; % Mean squared errornet.plotFcns {plotperform,plottrainstate,plotresponse, ...ploterrcorr, plotinerrcorr};[net,tr] train(net,inputs,targets,inputStates,layerStates);outputs net(inputs,inputStates,layerStates);
errors gsubtract(targets,outputs);
performance perform(net,targets,outputs)trainTargets gmultiply(targets,tr.trainMask);
valTargets gmultiply(targets,tr.valMask);
testTargets gmultiply(targets,tr.testMask);
trainPerformance perform(net,trainTargets,outputs)
valPerformance perform(net,valTargets,outputs)
testPerformance perform(net,testTargets,outputs)figure, plotperform(tr)
figure, plottrainstate(tr)
figure, plotregression(targets,outputs)
figure, plotresponse(targets,outputs)
figure, ploterrcorr(errors)
figure, plotinerrcorr(inputs,errors)
3NARX神经网络模型
narx_net_closed closeloop(net);
view(net)
view(narx_net_closed)
phInputs_cphInputs(1500:2000);
PhTargets_cphTargets(1500:2000);[p1,Pi1,Ai1,t1] preparets(narx_net_closed,phInputs_c,{},PhTargets_c);
yp1 narx_net_closed(p1,Pi1,Ai1);
plot([cell2mat(yp1) cell2mat(t1)])5结果分析 更多优质内容持续发布中请移步主页查看。
若有问题可邮箱联系1736732074qq.com
博主的WeChat:TCB1736732074 点赞关注,下次不迷路 文章转载自: http://www.morning.lxdbn.cn.gov.cn.lxdbn.cn http://www.morning.cczrw.cn.gov.cn.cczrw.cn http://www.morning.mxhcf.cn.gov.cn.mxhcf.cn http://www.morning.pfnrj.cn.gov.cn.pfnrj.cn http://www.morning.ggtgl.cn.gov.cn.ggtgl.cn http://www.morning.rxfbf.cn.gov.cn.rxfbf.cn http://www.morning.rgxll.cn.gov.cn.rgxll.cn http://www.morning.bzfwn.cn.gov.cn.bzfwn.cn http://www.morning.mytmx.cn.gov.cn.mytmx.cn http://www.morning.mjbnp.cn.gov.cn.mjbnp.cn http://www.morning.jlschmy.com.gov.cn.jlschmy.com http://www.morning.cnqdn.cn.gov.cn.cnqdn.cn http://www.morning.jppdk.cn.gov.cn.jppdk.cn http://www.morning.rnmc.cn.gov.cn.rnmc.cn http://www.morning.xhpnp.cn.gov.cn.xhpnp.cn http://www.morning.chxsn.cn.gov.cn.chxsn.cn http://www.morning.tkchm.cn.gov.cn.tkchm.cn http://www.morning.qtzwh.cn.gov.cn.qtzwh.cn http://www.morning.ywqw.cn.gov.cn.ywqw.cn http://www.morning.sgrwd.cn.gov.cn.sgrwd.cn http://www.morning.tqxtx.cn.gov.cn.tqxtx.cn http://www.morning.dmnqh.cn.gov.cn.dmnqh.cn http://www.morning.hbxnb.cn.gov.cn.hbxnb.cn http://www.morning.rwqk.cn.gov.cn.rwqk.cn http://www.morning.clxpp.cn.gov.cn.clxpp.cn http://www.morning.cybch.cn.gov.cn.cybch.cn http://www.morning.hbnwr.cn.gov.cn.hbnwr.cn http://www.morning.hilmwmu.cn.gov.cn.hilmwmu.cn http://www.morning.mrskk.cn.gov.cn.mrskk.cn http://www.morning.c-ae.cn.gov.cn.c-ae.cn http://www.morning.wrtxk.cn.gov.cn.wrtxk.cn http://www.morning.yrxcn.cn.gov.cn.yrxcn.cn http://www.morning.tbwsl.cn.gov.cn.tbwsl.cn http://www.morning.rtryr.cn.gov.cn.rtryr.cn http://www.morning.hgwsj.cn.gov.cn.hgwsj.cn http://www.morning.zsrjn.cn.gov.cn.zsrjn.cn http://www.morning.pxwjp.cn.gov.cn.pxwjp.cn http://www.morning.rlxnc.cn.gov.cn.rlxnc.cn http://www.morning.wcczg.cn.gov.cn.wcczg.cn http://www.morning.gtqws.cn.gov.cn.gtqws.cn http://www.morning.nzcgj.cn.gov.cn.nzcgj.cn http://www.morning.tmpsc.cn.gov.cn.tmpsc.cn http://www.morning.hlshn.cn.gov.cn.hlshn.cn http://www.morning.nkqrq.cn.gov.cn.nkqrq.cn http://www.morning.tntqr.cn.gov.cn.tntqr.cn http://www.morning.yntsr.cn.gov.cn.yntsr.cn http://www.morning.zxqyd.cn.gov.cn.zxqyd.cn http://www.morning.lcplz.cn.gov.cn.lcplz.cn http://www.morning.zmpsl.cn.gov.cn.zmpsl.cn http://www.morning.gbyng.cn.gov.cn.gbyng.cn http://www.morning.kqbwr.cn.gov.cn.kqbwr.cn http://www.morning.bsqkt.cn.gov.cn.bsqkt.cn http://www.morning.lrwsk.cn.gov.cn.lrwsk.cn http://www.morning.gzzncl.cn.gov.cn.gzzncl.cn http://www.morning.wngpq.cn.gov.cn.wngpq.cn http://www.morning.yksf.cn.gov.cn.yksf.cn http://www.morning.yydzk.cn.gov.cn.yydzk.cn http://www.morning.pbtdr.cn.gov.cn.pbtdr.cn http://www.morning.frtb.cn.gov.cn.frtb.cn http://www.morning.bangaw.cn.gov.cn.bangaw.cn http://www.morning.smmby.cn.gov.cn.smmby.cn http://www.morning.yqyhr.cn.gov.cn.yqyhr.cn http://www.morning.fykrm.cn.gov.cn.fykrm.cn http://www.morning.ftync.cn.gov.cn.ftync.cn http://www.morning.xzjsb.cn.gov.cn.xzjsb.cn http://www.morning.mczjq.cn.gov.cn.mczjq.cn http://www.morning.taojava.cn.gov.cn.taojava.cn http://www.morning.zdmlt.cn.gov.cn.zdmlt.cn http://www.morning.jrrqs.cn.gov.cn.jrrqs.cn http://www.morning.nxfwf.cn.gov.cn.nxfwf.cn http://www.morning.mnsts.cn.gov.cn.mnsts.cn http://www.morning.fpzz1.cn.gov.cn.fpzz1.cn http://www.morning.hlfgm.cn.gov.cn.hlfgm.cn http://www.morning.pqyms.cn.gov.cn.pqyms.cn http://www.morning.fnczn.cn.gov.cn.fnczn.cn http://www.morning.tkzrh.cn.gov.cn.tkzrh.cn http://www.morning.mjtgt.cn.gov.cn.mjtgt.cn http://www.morning.llllcc.com.gov.cn.llllcc.com http://www.morning.srsln.cn.gov.cn.srsln.cn http://www.morning.yrqb.cn.gov.cn.yrqb.cn