I need to identify the diffetent outputs of confusionmat
1 view (last 30 days)
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?
Tom Lane on 27 Oct 2014
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.