{
  "id": 169689,
  "title": "Question about Micro-Averaged F1",
  "url": "/competitions/birdsong-recognition/discussion/169689",
  "author_name": "",
  "post_date": "2020-07-24T18:26:03.165792300Z",
  "votes": 6,
  "comment_count": 1,
  "views": 0,
  "content": "<p>From reading a few articles and @enforcer007 's notebook, I wanted to clarify my understanding of the micro-averaged F1 measure for this competition.</p>\n\n<p>If we let <code>MAR</code> = Micro-averaged Recall and <code>MAP</code> = Micro-averaged Precision,</p>\n\n<p><code>\nMicro-averaged F1 \n= HarmonicMean(MAR, MAP) \n= 2 * MAR * MAP / (MAR + MAP)\n</code></p>\n\n<p>I interpreted MAR as: of the birds present, % correctly predicted, and MAP as: of the birds guessed, % that were correct.</p>\n\n<p>This interpretation would lead to the following sample table (each row is a \"row\" of the dataset).</p>\n\n<p>| True Label | Prediction | Micro-averaged Recall | Micro-averaged Precision | Micro-averaged F1 |\n| --- | --- | --- | --- | --- |\n| nocall | bktspa brnthr | 0 | 0 | 0 |\n| bktspa | bktspa brnthr | 1 | 0.5 | ~0.67 |\n| bktspa amered horlar | bktspa brnthr | ~0.33 | 0.5 | 0.4 |</p>\n\n<p>The row-wise micro-averaged F1 would then be the average of each row's micro-averaged F1.</p>\n\n<p>Would someone be able to verify if this indeed the correct interpretation? Thank you!</p>",
  "messages": [
    {
      "id": "944008",
      "postDate": "07/24/2020 18:26:03",
      "content": "<p>From reading a few articles and @enforcer007 's notebook, I wanted to clarify my understanding of the micro-averaged F1 measure for this competition.</p>\n\n<p>If we let <code>MAR</code> = Micro-averaged Recall and <code>MAP</code> = Micro-averaged Precision,</p>\n\n<p><code>\nMicro-averaged F1 \n= HarmonicMean(MAR, MAP) \n= 2 * MAR * MAP / (MAR + MAP)\n</code></p>\n\n<p>I interpreted MAR as: of the birds present, % correctly predicted, and MAP as: of the birds guessed, % that were correct.</p>\n\n<p>This interpretation would lead to the following sample table (each row is a \"row\" of the dataset).</p>\n\n<p>| True Label | Prediction | Micro-averaged Recall | Micro-averaged Precision | Micro-averaged F1 |\n| --- | --- | --- | --- | --- |\n| nocall | bktspa brnthr | 0 | 0 | 0 |\n| bktspa | bktspa brnthr | 1 | 0.5 | ~0.67 |\n| bktspa amered horlar | bktspa brnthr | ~0.33 | 0.5 | 0.4 |</p>\n\n<p>The row-wise micro-averaged F1 would then be the average of each row's micro-averaged F1.</p>\n\n<p>Would someone be able to verify if this indeed the correct interpretation? Thank you!</p>",
      "rawMarkdown": "From reading a few articles and @enforcer007 's notebook, I wanted to clarify my understanding of the micro-averaged F1 measure for this competition.\n\nIf we let `MAR` = Micro-averaged Recall and `MAP` = Micro-averaged Precision,\n\n```\nMicro-averaged F1 \n= HarmonicMean(MAR, MAP) \n= 2 * MAR * MAP / (MAR + MAP)\n```\n\nI interpreted MAR as: of the birds present, % correctly predicted, and MAP as: of the birds guessed, % that were correct.\n\nThis interpretation would lead to the following sample table (each row is a \"row\" of the dataset).\n\n| True Label | Prediction | Micro-averaged Recall | Micro-averaged Precision | Micro-averaged F1 |\n| --- | --- | --- | --- | --- |\n| nocall | bktspa brnthr | 0 | 0 | 0 |\n| bktspa | bktspa brnthr | 1 | 0.5 | ~0.67 |\n| bktspa amered horlar | bktspa brnthr | ~0.33 | 0.5 | 0.4 |\n\nThe row-wise micro-averaged F1 would then be the average of each row's micro-averaged F1.\n\nWould someone be able to verify if this indeed the correct interpretation? Thank you!",
      "votes": null
    },
    {
      "id": "944011",
      "postDate": "07/24/2020 18:26:28",
      "content": "<p>The resources I looked at in case it's helpful:\n- <a href=\"https://www.kaggle.com/c/birdsong-recognition/discussion/159383\">https://www.kaggle.com/c/birdsong-recognition/discussion/159383</a>\n- <a href=\"https://towardsdatascience.com/multi-class-metrics-made-simple-part-ii-the-f1-score-ebe8b2c2ca1\">https://towardsdatascience.com/multi-class-metrics-made-simple-part-ii-the-f1-score-ebe8b2c2ca1</a>\n- <a href=\"https://simonhessner.de/why-are-precision-recall-and-f1-score-equal-when-using-micro-averaging-in-a-multi-class-problem/\">https://simonhessner.de/why-are-precision-recall-and-f1-score-equal-when-using-micro-averaging-in-a-multi-class-problem/</a>\n- <a href=\"https://datascience.stackexchange.com/questions/64694/f1-scoreaverage-micro-is-equal-to-calculating-accuracy-for-multiclasificatio\">https://datascience.stackexchange.com/questions/64694/f1-scoreaverage-micro-is-equal-to-calculating-accuracy-for-multiclasificatio</a></p>",
      "rawMarkdown": "The resources I looked at in case it's helpful:\n- https://www.kaggle.com/c/birdsong-recognition/discussion/159383\n- https://towardsdatascience.com/multi-class-metrics-made-simple-part-ii-the-f1-score-ebe8b2c2ca1\n- https://simonhessner.de/why-are-precision-recall-and-f1-score-equal-when-using-micro-averaging-in-a-multi-class-problem/\n- https://datascience.stackexchange.com/questions/64694/f1-scoreaverage-micro-is-equal-to-calculating-accuracy-for-multiclasificatio",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 944011,
      "author_name": "eugenet12",
      "author_url": "",
      "post_date": "07/24/2020 18:26:28",
      "content": "<p>The resources I looked at in case it's helpful:\n- <a href=\"https://www.kaggle.com/c/birdsong-recognition/discussion/159383\">https://www.kaggle.com/c/birdsong-recognition/discussion/159383</a>\n- <a href=\"https://towardsdatascience.com/multi-class-metrics-made-simple-part-ii-the-f1-score-ebe8b2c2ca1\">https://towardsdatascience.com/multi-class-metrics-made-simple-part-ii-the-f1-score-ebe8b2c2ca1</a>\n- <a href=\"https://simonhessner.de/why-are-precision-recall-and-f1-score-equal-when-using-micro-averaging-in-a-multi-class-problem/\">https://simonhessner.de/why-are-precision-recall-and-f1-score-equal-when-using-micro-averaging-in-a-multi-class-problem/</a>\n- <a href=\"https://datascience.stackexchange.com/questions/64694/f1-scoreaverage-micro-is-equal-to-calculating-accuracy-for-multiclasificatio\">https://datascience.stackexchange.com/questions/64694/f1-scoreaverage-micro-is-equal-to-calculating-accuracy-for-multiclasificatio</a></p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "944008": "From reading a few articles and @enforcer007 's notebook, I wanted to clarify my understanding of the micro-averaged F1 measure for this competition.\n\nIf we let `MAR` = Micro-averaged Recall and `MAP` = Micro-averaged Precision,\n\n```\nMicro-averaged F1 \n= HarmonicMean(MAR, MAP) \n= 2 * MAR * MAP / (MAR + MAP)\n```\n\nI interpreted MAR as: of the birds present, % correctly predicted, and MAP as: of the birds guessed, % that were correct.\n\nThis interpretation would lead to the following sample table (each row is a \"row\" of the dataset).\n\n| True Label | Prediction | Micro-averaged Recall | Micro-averaged Precision | Micro-averaged F1 |\n| --- | --- | --- | --- | --- |\n| nocall | bktspa brnthr | 0 | 0 | 0 |\n| bktspa | bktspa brnthr | 1 | 0.5 | ~0.67 |\n| bktspa amered horlar | bktspa brnthr | ~0.33 | 0.5 | 0.4 |\n\nThe row-wise micro-averaged F1 would then be the average of each row's micro-averaged F1.\n\nWould someone be able to verify if this indeed the correct interpretation? Thank you!",
    "944011": "The resources I looked at in case it's helpful:\n- https://www.kaggle.com/c/birdsong-recognition/discussion/159383\n- https://towardsdatascience.com/multi-class-metrics-made-simple-part-ii-the-f1-score-ebe8b2c2ca1\n- https://simonhessner.de/why-are-precision-recall-and-f1-score-equal-when-using-micro-averaging-in-a-multi-class-problem/\n- https://datascience.stackexchange.com/questions/64694/f1-scoreaverage-micro-is-equal-to-calculating-accuracy-for-multiclasificatio"
  },
  "source": "meta"
}