مساعدة في شرح هذا الكود الشبكات العصبية باستخدام برنامج الماتلاب

السلام عليكم و رحمة الله و بركاته
اريد مساعدة في شرح هذا الكود الشبكات العصبية باستخدام برنامج الماتلاب

% normalization
[pn,ps]=mapminmax(p); % p is the input data matrix (training)
[tn,ts]=mapminmax(t); % t is the output data matrix (training)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
net=newff(minmax(pn), [5 1], {'tansig','purelin'},'trainbr');
net.trainParam.show = 50; % The result is shown at every # epoch
net.trainParam.lr = 0.05; % Learning rate used in some gradient schemes
net.trainParam.epochs = 1000; % Max number of iterations
net.trainParam.goal = 1e-3; % Error tolerance; stopping criterion
net = init(net);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% train network
[net,tr,Y,E] = train(net, pn, tn);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% To simulate the training data
an = sim(net,pn);
% denormaliz
a = mapminmax('reverse',an,ts);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% load forecasting
pt1n = mapminmax('apply',pt1,ps); % inputs for forecasting
pf1n = sim(net,pt1n);
pf1 = mapminmax('reverse',pf1n,ts); % forecasted load consumption
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
The instructions used in the Matlab code are well described in mathwork website, also some examples are discussed. you can also use the help of Matlab Software.
Globally, In this code the inputs and targets are normalized, the network (feed-forward backpropagation network) is created and initialized, and after the training step, the latter is simulated in order assess the classification robustness.

NB: The inputs and targets are missed!
If you have any question, don't hesitate!
Good luck!
 
عودة
أعلى