first way calculate f1-score: 0.66 second way calculate f1-score_2: 0.938 Being the first way@suchizsuggested: apply the formula of thef1-score: (2 * precision + recall) / (precision + recall), in the results of the "compute_ap" function that returns in addition to the Average Precis...
In this case, we need a balanced tradeoff between precision and recall. This is where the f1 score comes in. The f1 score is the harmonic mean of precision and recall. If you are inquisitive like me, you may want to ask why the harmonic mean? Well, harmonic mean penalizes lower values...