I get an average of precision 82.59 and recall 69.84 using bboxPrecisionRecall for segmenting Arabic words algorithm. I need someone to help me to calculate TN, FP, FN, and TP using the confusion matrix to evaluate the performance of the method. Is the precision equal the accuracy of the method? If not, how can I calculate it? The segmentation method applied to 1131 images and compared with ground truth.
Asked
Active
Viewed 364 times
1 Answers
0
I am not too sure about how the confusion matrix is arranged in MATLAB, but in Python, the one imported from sklearn.metrics is arranged as such:
from sklearn.metrics import confusion_matrix
confusion_matrix(ground_truth, predictions) = array([[TN, FP],
FN, TP]])
Accuracy is not the same as precision. Precision is measured using TP/(TP+FP) while accuracy is measured using (TP+TN)/(TP+TN+FP+FN)

Strider1994
- 141
- 1
- 7
-
Could I get one value by using these equations? – N.white May 14 '20 at 19:56
-
Precision = 82.59 and recall = 69.84 and recall = TP/(TP+FN) – N.white May 14 '20 at 20:22
-
Total = TP+FP+TN+FN , the value of Total = 1131 – N.white May 14 '20 at 20:29
-
1What do you mean by one value? – Strider1994 May 16 '20 at 09:20
-
The confusion matrix is needed 4 values known, isn't it? I have got one value for recall. If I can calculate to get one more value I could get the two values. – N.white May 16 '20 at 14:22
-
I see what you mean. If you could also obtain the accuracy score, then it'd be possible to calculate the individual values of TP, TN, FP and FN since you will need at least 4 different eqn to calculate 4 unknowns. – Strider1994 May 17 '20 at 06:31