# Precision and Recall for different threshold or algorithm?

**URL:** <https://community.deeplearning.ai/t/precision-and-recall-for-different-threshold-or-algorithm/162697>\
**Category:** Advanced Learning Algorithms\
**Tags:** week-module-3\
**Created:** [July 16, 2022, 7:04am UTC](https://community.deeplearning.ai/t/precision-and-recall-for-different-threshold-or-algorithm/162697 "2022-07-16T07:04:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thala](https://avatars.discourse-cdn.com/v4/letter/t/f05b48/32.png) [@Thala](https://community.deeplearning.ai/u/Thala)\
**Post date:** [July 16, 2022, 7:04am UTC](https://community.deeplearning.ai/t/precision-and-recall-for-different-threshold-or-algorithm/162697/1 "2022-07-16T07:04:12Z")

</div>

The instructor discusses how choosing a different _threshold_ value can affect precision and recall.  
But in the next slide

 ![image](https://global.discourse-cdn.com/dlai/original/3X/e/a/ea1c06a085d4f276bfde7fef27443fba11890db2.png)

There is a comparison among different sets of Precision and Recall values for different _algorithms_.

So is it the comparison for different threshold values for _same algorithm_ or same threshold value for _different algorithms_ ?

---

<div class="post-metadata">

**Author:** ![SamReiswig](https://avatars.discourse-cdn.com/v4/letter/s/dbc845/32.png) [@SamReiswig](https://community.deeplearning.ai/u/SamReiswig)\
**Post date:** [July 16, 2022, 8:14am UTC](https://community.deeplearning.ai/t/precision-and-recall-for-different-threshold-or-algorithm/162697/2 "2022-07-16T08:14:30Z")

</div>

Hi!

In the video, it seems to be implied that it’s the same Algorithm with different Threshold values.

However, we can use F1 for comparing different algorithms with the same threshold value as well as different algorithms with different threshold values.

Consider the following hypothetical:  
Train two different algorithms on the same task.  
Use F1 to find the best threshold value for both algorithms separately.  
Then select the algorithm with the best F1 score overall to get the single best algorithm for the task.

Hope this was a helpful explanation!

Sam
