I need to identify the diffetent outputs of confusionmat
2 ビュー (過去 30 日間)
I`m using the funtion confusionmat and I need to know the position of true positives and true negatives in this matrix.
In this case, which are the true positives and true negatives if this is the output of confusionmat?
回答 (1 件)
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:
tree = fitctree(meas,species);
[c,a] = confusionmat(species,predict(tree,meas))
50 0 0
0 47 3
0 0 50
You could compute true negatives and positives from this information, but they are not returned directly.