how to apply confusion matrix?

4 次查看(过去 30 天)
Ekta Sharma
Ekta Sharma 2016-7-7
I have applied three methods i.e. chain code,pixel matching and morphological operations. Depending upon these methods three classes are there in which I have classified tool state i.e. normal, worn or unknown. If for example my actual output is 1- for normal, 8- worn,1- unknown and predicted are 2-normal,1- unknown and 7-worn. How it can be represented in confusion matrix to determine false positive,true positive etc.

回答(1 个)

Image Analyst
Image Analyst 2016-7-7
You can't just have bulk counts for how many are in each class - that's not sufficient. You need to know for each sample image, what the measured/predicted classification was, and what the actual/true classification was. Once you know that, it's trivial to construct the confusion matrix.
  2 个评论
messaoudi nada
messaoudi nada 2021-10-13
Dear @Image Analyst ,i have target= 640*1 double and output=640*1 double , i calculated confusion matrix by the matlab function confusionmat , when i tried to plot the confusion matrix by the function plotconfusion " plotconfusion(target ,output) , but it didn't work ,, can u help me , i dont know what's wrong in my code
Image Analyst
Image Analyst 2021-10-13
Attach your target and output in a .mat file.

请先登录,再进行评论。

Community Treasure Hunt

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

Start Hunting!

Translated by