error when trying to generate confusion matrix from a trained convolutional neural network
Show older comments
i keep getting this error but not sure why
{Error using == (line 25)
Invalid types for comparison.
Error in confusion (line 45)
if ~all((targets==0) | (targets==1) | isnan(targets))
Error in cnn11 (line 89)
[c,cm,ind,per] = confusion(TTest,YTest)
}
I am using a cnn in the neural net toolbox and trying to generate a confusion matrix for it this is my code ( nfoldTest1 is my testing set) convnet = trainNetwork(Train1,layers,options) save convnet
YTest = classify(convnet,nfoldTest1;
TTest = nfoldTest1.Labels;
accuracy = sum(YTest == TTest)/numel(TTest)
[c,cm,ind,per] = confusion(TTest,YTest)
Accepted Answer
More Answers (0)
Categories
Find more on Deep Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!