I use a yolo (y) to detect only one object and a multiclassifier (mc) that classifies that object. Now, the problem is: what I have to do with yolo's false positive and false negative, if I want to compute the whole system accuracy, precision and recall?

Now I'm computing overall accuracy like this:

acc = (tp_mc + tn_mc) / (tp_mc + tn_mc + fp_mc + fn_mc + fn_y + fp_y)

To compute precision and recall I'm doing that for each class of mc:

precision_i = tp_mc_i / (tp_mc_i + fp_mc_i + fp_y_i)

recall_i = tp_mc_i / (tp_mc_i + fn_mc_i + fn_y_i)

Where fp_y_i and fn_y_i are the yolo's false positive and false negative that belongs to the class i of the multiclassifier. Do you think that this is the correct way to compute accuracy, precision and recall?


What matters is whether the instance is classified correctly or not at the end, so it's only about mapping correctly the cases from the y classifier:

  • tp_y is easy, it's the classification status of the mc classifier
  • tn_y is a TN for every class $i$.
  • fp_y is a FP for the class $i$ predicted by mc and a TN for every other class.
  • fn_y is a FN for the true class $i$ and a TN for every other class.

I'm not sure what you count as tn_mc here? Normally in a multiclass setting accuracy is the sum of $TP_i$ for every class $i$, because there's no TN. That would give us:


With $n$ the total number of instances (from the start, not only the ones fed to mc)

Your precision and recall formulas look correct to me, assuming that fp_y_i are the FP instances where $i$ is the predicted class whereas fn_y_i are the FN instances where $i$ is the true class.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.