Neural net work code

조회 수: 9 (최근 30일)
Veen Qas
Veen Qas 2022년 4월 22일
Hi, I am not expert in NNT modeling , but I am trying to train a set of data, I have two inputs and 3 outputs, for now I am using one layer with 7 neurons. The program is running but I can not understand the results and I can not see how my output is matching the original data , I tried to take the trained output to excel but I got confused as I was not sure this output corresponds to which original data
your help is appreciated
hiddenlayersize=7;
net=fitnet(hiddenlayersize);
net.divideParam.trainRatio=80/100;
net.divideParam.valRatio= 10/100;
net.divideParam.testRatio=10/100;
xn=x';
Yn=Y';
[net,tr]=train(net,xn,Yn);
Ytrain=net(xn(:,tr.trainInd));
YtrainTrue=Yn(tr.trainInd);
sqrt(mean(Ytrain-YtrainTrue).^2);
Yval=net(xn(:,tr.valInd));
YvalTrue=Yn(tr.valInd);
sqrt(mean(Yval-YvalTrue).^2);
%plot(YvalTrue,Yval,'0'); hold on
plot(YtrainTrue,Ytrain,'o',YvalTrue,Yval,'*'); hold on
plot(0:30,0:30); hold off
save net

답변 (0개)

카테고리

Help CenterFile Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by