How can i evaluate my network performance as i have trained my model?

I have trained my model with 100% accuracy,but i want to evaluate my trained work from test data set or unseen data.what should i add in my code for testing purpose? i-e to test validation data and test data
p = u; %inputs
t = f; %targets
[pn,ps] = mapminmax(p);
[tn,ts] = mapminmax(t);
%net = newff(p,t,10,10{},'trainlm');
net=newff(minmax(pn),[30,25,16],{'tansig','tansig','purelin'},'trainscg');
%net = init(net);
% net.IW{1,1}=wts0;
% net.b{1}=bias0;
net.trainParam.show =2;
net.trainParam.epochs =5000;
net.trainParam.goal =1e-7;
%net.trainParam.mc=0.95;
net.trainParam.lr=0.2;
[net,tr] = train(net,pn,tn);
ANN = sim(net,pn);
output1= mapminmax('reverse',ANN,ts);
wts1=net.IW{1,1};
bias1=net.b{1};

 Risposta accettata

7 Commenti

i calculated the peformance by perf = perform(net,t,y).
performance = 9.8312e-05.
But how to check my network overfits or not?
secondly i used SIM to check my network performance.is it right approch?
A = sim(net,X);
sim() tells you predictions but does not check the predictions against the known results, so it cannot be directly used to calculate how effective the network is.
To check for overfitting, look at the test and validation outcomes. validation will be poor if you are overfitting.
so what does performance = 9.8312e-05 shows?its only training performance or net performance?
perform() calculates the performance of whatever data you pass in. It does not have to be training or test data or validation data. If you pass in all of your data then it will calculate it for all of your data.
i am using this example
i want to divide data like this but its not working
% Setup Division of Data for Training, Validation, Testing
net.divideParam.trainRatio = 80/100;
net.divideParam.valRatio = 10/100;
net.divideParam.testRatio = 10/100;
The code for that example does not create a network named "net". Are you trying to apply that to deepnet just before
% Train the deep network on the wine data.
?
yes....i am not sure about the syntax "deepnet" or only "net".i want to divide my data into train,validation and test as given below and at the end i am trying to get confusion matrix with validation and test set as shown in attached figure.
% Setup Division of Data for Training, Validation, Testing
deepnet.divideParam.trainRatio = 80/100;
deepnet.divideParam.valRatio = 10/100;
deepnet.divideParam.testRatio = 10/100;

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Deep Learning Toolbox in Centro assistenza e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by