I want to save view(net) as an image in 2013b. I searched (https://stackoverflow.com/questions/14919140/matlab-how-to-save-view-configuration) and used them but not succeeded.
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
% Solve an Input-Output Fitting problem with a Neural Network
% Script generated by Neural Fitting app
% Created 19-Nov-2023 14:43:06
%
% This script assumes these variables are defined:
%
% t - input data.
% z_num - target data.
x = t';
t = z_num';
% 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 = 'trainbr'; % Levenberg-Marquardt backpropagation.
% Create a Fitting Network
hiddenLayerSize = 12;
net = fitnet(hiddenLayerSize,trainFcn);
net.trainParam.epochs = 20;
% 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_P98 = net(x);
e_P98 = gsubtract(t,y_P98);
performance = perform(net,t,y_P98);
view(net);
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Sequence and Numeric Feature Data Workflows finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!