I need to identify the diffetent outputs of confusionmat

조회 수: 1 (최근 30일)
Ines
Ines 2014년 10월 19일
댓글: muhammad 2015년 8월 31일
Hello!
I`m using the funtion confusionmat and I need to know the position of true positives and true negatives in this matrix.
For example
ans=
156 30
40 79
In this case, which are the true positives and true negatives if this is the output of confusionmat?
  댓글 수: 1
muhammad
muhammad 2015년 8월 31일
hello i am also facing the same situation ..Did you get the solution?

댓글을 달려면 로그인하십시오.

답변 (1개)

Tom Lane
Tom Lane 2014년 10월 27일
The matrix is the count of actual and predicted values for each class. You can use the second output to get the class names. For example:
load fisheriris
tree = fitctree(meas,species);
[c,a] = confusionmat(species,predict(tree,meas))
c =
50 0 0
0 47 3
0 0 50
a =
'setosa'
'versicolor'
'virginica'
You could compute true negatives and positives from this information, but they are not returned directly.
  댓글 수: 1
muhammad
muhammad 2015년 8월 31일
my C is like this as shown in below
0 670
181 10909
and a(order) is
1
2
please let me know how to find the TP,TN,Fp,Fn.

댓글을 달려면 로그인하십시오.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by