Neural net work code

1 回表示 (過去 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 Center および File ExchangeDeep Learning Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by