Home > other >  BP neural network to do to fit the error is too big, can't figure out where there is a problem,
BP neural network to do to fit the error is too big, can't figure out where there is a problem,

Time:09-25

Topic as shown in figure, I know that you can use other ways to do, but I'm learning neural network so would like to try using the Internet,

The code is as follows:

> clear; clc;
> I=1:1:18;
> Y=[502.8 525.0 514.3 451.0 326.5 188.6
...92.2 59.6 62.2 102.7 147.1 191.3...
236.0 280.5 324.9 369.4 413.8 458.3];
> Net=newff (I, y, [10] and {' tansig 'and' purelin '}, 'trainlm); Initial network %
> Net. TrainParam. Epochs=10000; % the largest number of training
> Net. TrainParam. Goal=0.000005;
% training required precision
> Net="train" (.net, I, y); % network training
> Net y1=sim (I) % y1 to predict the results
Y1=
1 to 7 column
502.8000 525.0000 514.3000 492.3984 326.5000 188.6000 104.2602
8 to 14 columns
74.6223 89.1165 102.7000 147.1000 168.4599 236.0000 280.5000
15 to 18 column
324.9000 369.4000 470.5031 458.3000 & gt;> The plot (I, y1, 'x')
drawing initial sample points> The plot (I, y, 'x')
> Hold on
> The plot (1-0. 1:18, sim (.net, 1-0. 1:18), '*') neural network fitting drawing


This is the result of simulation





Feel the error is quite large, with net fitting example of others do a big gap, I tried a lot of other learning function, less effective as a result, some even no convergence, consult everybody, in addition to the problem is there

CodePudding user response:

My top
  • Related