Skip to content

Commit aca1147

Browse files
authored
Merge pull request #91287 from abdelhak2406/patch-1
fix: error in calculation of precision recall f1
2 parents adb29af + fa51080 commit aca1147

File tree

1 file changed

+3
-3
lines changed
  • articles/cognitive-services/language-service/custom-named-entity-recognition/concepts

1 file changed

+3
-3
lines changed

articles/cognitive-services/language-service/custom-named-entity-recognition/concepts/evaluation-metrics.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ The model would have the following entity-level evaluation, for the *city* entit
7878
| False Positive | 1 | *Forrest* was incorrectly predicted as *city* while it should have been *person*. |
7979
| False Negative | 1 | *Frederick* was incorrectly predicted as *person* while it should have been *city*. |
8080

81-
* **Precision** = `#True_Positive / (#True_Positive + #False_Positive)` = `2 / (2 + 1) = 0.67`
82-
* **Recall** = `#True_Positive / (#True_Positive + #False_Negatives)` = `2 / (2 + 1) = 0.67`
83-
* **F1 Score** = `2 * Precision * Recall / (Precision + Recall)` = `(2 * 0.67 * 0.67) / (0.67 + 0.67) = 0.67`
81+
* **Precision** = `#True_Positive / (#True_Positive + #False_Positive)` = `1 / (1 + 1) = 0.5`
82+
* **Recall** = `#True_Positive / (#True_Positive + #False_Negatives)` = `1 / (1 + 1) = 0.5`
83+
* **F1 Score** = `2 * Precision * Recall / (Precision + Recall)` = `(2 * 0.5 * 0.5) / (0.5 + 0.5) = 0.5`
8484

8585
### Model-level evaluation for the collective model
8686

0 commit comments

Comments
 (0)