Is it possible to see which instances are classified incorrectly for the trainImage​CategoryCl​assifier example?

4 次查看(过去 30 天)
I'm getting some good results going through the steps in the trainImageCategoryClassifier example (https://www.mathworks.com/help/vision/ref/trainimagecategoryclassifier.html?s_tid=doc_ta). However, all I can see at the moment is the confusion matrix. I'd like to know which of my testing samples are being misclassified so that I can evaluate them and see if there is anything that is obvious about them that might warrant further study.

采纳的回答

Michael Cooper-Stachowsky
I've answered my own question with a bit of searching, sorry!
%output classifications
for i = 1:length(testSet.Files)
[idx,score] = predict(categoryClassifier,readimage(testSet,i));
if (testSet.Labels(i) ~= categoryClassifier.Labels(idx))
i %just output the index, do interesting things with it later
end
end

更多回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by