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

confusion matrixneural network

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 ?

Best Answer

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