-1

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.

N.white
  • 67
  • 10

1 Answers1

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