MATLAB Answers

How to display Confusion matrix of Testing ,Training and Validation without using nprtool

72 views (last 30 days)
Saira
Saira on 18 Jun 2012
Commented: Supriya Pahwa on 6 Aug 2015
Hello Everyone ,
I want to display confusion matrix of Testing , Training and validation through code .
plotConfusion(Target, Output) only displays the overall confusion matrix .
i can only show the three matrices first time i train the network using newpr. How to display them again ?

Accepted Answer

Greg Heath
Greg Heath on 19 Jun 2012
net = patternnet(x,t,H); [net tr ] = train(net,x,t);
The training record in the structure tr contains the indices for the trn/val/tst subsets.
Therefore, they can be used to obtain separate performance results.
Hope this helps.
Greg
  3 Comments
Supriya Pahwa
Supriya Pahwa on 6 Aug 2015
yTst = net(x(:,tr.testInd)) when i use this command, i get an error. Subscript indices must either be real positive integers or logicals.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!