Neural Net Fitting - How to get a training result table when using multiple hidden layers
Afficher commentaires plus anciens
I trained the neural network in the Neural Net Fitting app to regress my data using a multiple hidden layer(short for MHL) and brought the training script to the editor through the generation code.
I added hidden layers 2,3 as the attached code to implement MHL in the editor. After running that code, I realized that I couldn't get a training result table(short for TRT) like the picture.

When using only one hidden layer, the Neural Net Fitting app showed the TRT as shown in the picture. I need to get the TRT through the code using the MHL to write the report.
No matter how much I looked, I couldn't find the related command.
Is it not possible to create a TRT because I am using MHL?
If I use the Figure command, can I get the TRT even from the code using the MHL? Please tell me specific command.
Can I get the TRT in a way other than the Figure command? Please tell me the specific command.
% Solve an Input-Output Fitting problem with a Neural Network
% Script generated by Neural Fitting app
% Created 17-Jan-2022 05:03:24
%
% This script assumes these variables are defined:
%
% inputdata - input data.
% outputbeadwidth - target data.
x = inputdata';
t = outputbeadwidth';
% Choose a Training Function
% For a list of all training functions type: help nntrain
% 'trainlm' is usually fastest.
% 'trainbr' takes longer but may be better for challenging problems.
% 'trainscg' uses less memory. Suitable in low memory situations.
trainFcn = 'trainlm'; % Levenberg-Marquardt backpropagation.
% Create a Fitting Network
hiddenLayer1Size = 30;
hiddenLayer2Size = 20;
hiddenLayer3Size = 20;
net = fitnet([hiddenLayer1Size,hiddenLayer2Size,hiddenLayer3Size],trainFcn);
% Setup Division of Data for Training, Validation, Testing
net.divideParam.trainRatio = 70/100;
net.divideParam.valRatio = 15/100;
net.divideParam.testRatio = 15/100;
% Train the Network
[net,tr] = train(net,x,t);
% Test the Network
y = net(x);
e = gsubtract(t,y);
performance = perform(net,t,y)
% View the Network
view(net)
% Plots
% Uncomment these lines to enable various plots.
%figure, plotperform(tr)
%figure, plottrainstate(tr)
%figure, ploterrhist(e)
%figure, plotregression(t,y)
%figure, plotfit(net,x,t)
Réponses (0)
Catégories
En savoir plus sur Pattern Recognition dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!