{
  "id": 229812,
  "title": "Leaderboard Reset: F1, F2, F0.5, Precision, Recall and Metric Selection  ",
  "url": "/competitions/coleridgeinitiative-show-us-the-data/discussion/229812",
  "author_name": "James McGuigan",
  "post_date": "2021-03-31T20:30:46.149000",
  "votes": 4,
  "comment_count": 0,
  "views": 0,
  "content": "<p>The competition sponsors had decided that Precision was their metric of choice. </p>\n<p>Within the first two days of this competition, we achieved a 1.000 score on the leaderboard. </p>\n<p>On the first day of the competition, I looked at the dataset and saw a tabular data problem. Strategy is the Memory Patterns agent from Rock Paper Scissors. Solution is to build a lookup table. I didn't properly understand the competition metric.</p>\n<ul>\n<li><a href=\"https://www.kaggle.com/jamesmcguigan/coleridge-string-literals\" target=\"_blank\">https://www.kaggle.com/jamesmcguigan/coleridge-string-literals</a></li>\n</ul>\n<p>On the second day <a href=\"https://www.kaggle.com/josephassaker\" target=\"_blank\">@josephassaker</a> had a similar idea but simply searched for the formal dataset titles. This surprised him too when he got a 1.000 score. This method achieved 100% Precision. </p>\n<ul>\n<li><a href=\"https://www.kaggle.com/josephassaker/coleridge-initiative-eda-na-ve-submission\" target=\"_blank\">https://www.kaggle.com/josephassaker/coleridge-initiative-eda-na-ve-submission</a></li>\n</ul>\n<p>On the third day, Kaggle realized that this was not the solution the competition sponsors wanted, thus they reset the leaderboard and replaced the competition metric with the F0.5 score.</p>\n<p>So what exactly do Precision and Recall actually mean?</p>\n<p>100% Precision means that every we gave an answer, it was always correct and we never got one wrong. We may however have failed to find all the items we were looking for.</p>\n<p>100% Recall means that we have successfully found all the available matches in the dataset. but we may also have a big pile of additional false positives.</p>\n<p>If neither of these extremes is to your liking, then it is possible to blend them together. This is called the F score. This is most commonly implemented as the F1 score, which is the harmonic means of Precision and Recall.</p>\n<pre><code>F1 = 2 * (Precision * Recall) / (Precision + Recall)\n</code></pre>\n<p>However, the competition sponsors were biased, they understood now the importance of Recall, but still, they had a preference for Precision. Thus they chose the F0.5 score, which is defined as thus:</p>\n<pre><code>F0.5 = ((1 + 0.5^2) * Precision * Recall) / (0.5^2 * Precision + Recall)\nF0.5 = (1.25 * Precision * Recall) / (0.25 * Precision + Recall)\n</code></pre>\n<p>Had they wanted, they could have also chosen the F2 score, which is biased towards Recall. But they didn't.</p>\n<pre><code>F2 = ((1 + 2^2) * Precision * Recall) / (2^2 * Precision + Recall)\nF2 = (5 * Precision * Recall) / (4 * Precision + Recall)\n</code></pre>\n<p>Kaggle then reset the leaderboard. Ding! Ding! Round Two of the Competition!</p>\n<p><a href=\"https://machinelearningmastery.com/\" target=\"_blank\">Jason Brownlee</a> has done a more in-depth writeup of the F Score Metric here:</p>\n<ul>\n<li><a href=\"https://machinelearningmastery.com/fbeta-measure-for-machine-learning/\" target=\"_blank\">https://machinelearningmastery.com/fbeta-measure-for-machine-learning/</a></li>\n</ul>",
  "messages": [
    {
      "id": 1258717,
      "postDate": "2021-03-31T20:30:46.150Z",
      "content": "<p>The competition sponsors had decided that Precision was their metric of choice. </p>\n<p>Within the first two days of this competition, we achieved a 1.000 score on the leaderboard. </p>\n<p>On the first day of the competition, I looked at the dataset and saw a tabular data problem. Strategy is the Memory Patterns agent from Rock Paper Scissors. Solution is to build a lookup table. I didn't properly understand the competition metric.</p>\n<ul>\n<li><a href=\"https://www.kaggle.com/jamesmcguigan/coleridge-string-literals\" target=\"_blank\">https://www.kaggle.com/jamesmcguigan/coleridge-string-literals</a></li>\n</ul>\n<p>On the second day <a href=\"https://www.kaggle.com/josephassaker\" target=\"_blank\">@josephassaker</a> had a similar idea but simply searched for the formal dataset titles. This surprised him too when he got a 1.000 score. This method achieved 100% Precision. </p>\n<ul>\n<li><a href=\"https://www.kaggle.com/josephassaker/coleridge-initiative-eda-na-ve-submission\" target=\"_blank\">https://www.kaggle.com/josephassaker/coleridge-initiative-eda-na-ve-submission</a></li>\n</ul>\n<p>On the third day, Kaggle realized that this was not the solution the competition sponsors wanted, thus they reset the leaderboard and replaced the competition metric with the F0.5 score.</p>\n<p>So what exactly do Precision and Recall actually mean?</p>\n<p>100% Precision means that every we gave an answer, it was always correct and we never got one wrong. We may however have failed to find all the items we were looking for.</p>\n<p>100% Recall means that we have successfully found all the available matches in the dataset. but we may also have a big pile of additional false positives.</p>\n<p>If neither of these extremes is to your liking, then it is possible to blend them together. This is called the F score. This is most commonly implemented as the F1 score, which is the harmonic means of Precision and Recall.</p>\n<pre><code>F1 = 2 * (Precision * Recall) / (Precision + Recall)\n</code></pre>\n<p>However, the competition sponsors were biased, they understood now the importance of Recall, but still, they had a preference for Precision. Thus they chose the F0.5 score, which is defined as thus:</p>\n<pre><code>F0.5 = ((1 + 0.5^2) * Precision * Recall) / (0.5^2 * Precision + Recall)\nF0.5 = (1.25 * Precision * Recall) / (0.25 * Precision + Recall)\n</code></pre>\n<p>Had they wanted, they could have also chosen the F2 score, which is biased towards Recall. But they didn't.</p>\n<pre><code>F2 = ((1 + 2^2) * Precision * Recall) / (2^2 * Precision + Recall)\nF2 = (5 * Precision * Recall) / (4 * Precision + Recall)\n</code></pre>\n<p>Kaggle then reset the leaderboard. Ding! Ding! Round Two of the Competition!</p>\n<p><a href=\"https://machinelearningmastery.com/\" target=\"_blank\">Jason Brownlee</a> has done a more in-depth writeup of the F Score Metric here:</p>\n<ul>\n<li><a href=\"https://machinelearningmastery.com/fbeta-measure-for-machine-learning/\" target=\"_blank\">https://machinelearningmastery.com/fbeta-measure-for-machine-learning/</a></li>\n</ul>",
      "rawMarkdown": "The competition sponsors had decided that Precision was their metric of choice. \n\nWithin the first two days of this competition, we achieved a 1.000 score on the leaderboard. \n\nOn the first day of the competition, I looked at the dataset and saw a tabular data problem. Strategy is the Memory Patterns agent from Rock Paper Scissors. Solution is to build a lookup table. I didn't properly understand the competition metric.\n- https://www.kaggle.com/jamesmcguigan/coleridge-string-literals\n\nOn the second day @josephassaker had a similar idea but simply searched for the formal dataset titles. This surprised him too when he got a 1.000 score. This method achieved 100% Precision. \n- https://www.kaggle.com/josephassaker/coleridge-initiative-eda-na-ve-submission\n\nOn the third day, Kaggle realized that this was not the solution the competition sponsors wanted, thus they reset the leaderboard and replaced the competition metric with the F0.5 score.\n\nSo what exactly do Precision and Recall actually mean?\n\n100% Precision means that every we gave an answer, it was always correct and we never got one wrong. We may however have failed to find all the items we were looking for.\n\n100% Recall means that we have successfully found all the available matches in the dataset. but we may also have a big pile of additional false positives.\n\nIf neither of these extremes is to your liking, then it is possible to blend them together. This is called the F score. This is most commonly implemented as the F1 score, which is the harmonic means of Precision and Recall.\n\n```\nF1 = 2 * (Precision * Recall) / (Precision + Recall)\n```\n\nHowever, the competition sponsors were biased, they understood now the importance of Recall, but still, they had a preference for Precision. Thus they chose the F0.5 score, which is defined as thus:\n```\nF0.5 = ((1 + 0.5^2) * Precision * Recall) / (0.5^2 * Precision + Recall)\nF0.5 = (1.25 * Precision * Recall) / (0.25 * Precision + Recall)\n```\n\nHad they wanted, they could have also chosen the F2 score, which is biased towards Recall. But they didn't.\n```\nF2 = ((1 + 2^2) * Precision * Recall) / (2^2 * Precision + Recall)\nF2 = (5 * Precision * Recall) / (4 * Precision + Recall)\n```\n\nKaggle then reset the leaderboard. Ding! Ding! Round Two of the Competition!\n\n [Jason Brownlee](https://machinelearningmastery.com/) has done a more in-depth writeup of the F Score Metric here:\n- https://machinelearningmastery.com/fbeta-measure-for-machine-learning/",
      "votes": 4
    }
  ],
  "comments": [],
  "raw_markdown_by_id": {
    "1258717": "The competition sponsors had decided that Precision was their metric of choice. \n\nWithin the first two days of this competition, we achieved a 1.000 score on the leaderboard. \n\nOn the first day of the competition, I looked at the dataset and saw a tabular data problem. Strategy is the Memory Patterns agent from Rock Paper Scissors. Solution is to build a lookup table. I didn't properly understand the competition metric.\n- https://www.kaggle.com/jamesmcguigan/coleridge-string-literals\n\nOn the second day @josephassaker had a similar idea but simply searched for the formal dataset titles. This surprised him too when he got a 1.000 score. This method achieved 100% Precision. \n- https://www.kaggle.com/josephassaker/coleridge-initiative-eda-na-ve-submission\n\nOn the third day, Kaggle realized that this was not the solution the competition sponsors wanted, thus they reset the leaderboard and replaced the competition metric with the F0.5 score.\n\nSo what exactly do Precision and Recall actually mean?\n\n100% Precision means that every we gave an answer, it was always correct and we never got one wrong. We may however have failed to find all the items we were looking for.\n\n100% Recall means that we have successfully found all the available matches in the dataset. but we may also have a big pile of additional false positives.\n\nIf neither of these extremes is to your liking, then it is possible to blend them together. This is called the F score. This is most commonly implemented as the F1 score, which is the harmonic means of Precision and Recall.\n\n```\nF1 = 2 * (Precision * Recall) / (Precision + Recall)\n```\n\nHowever, the competition sponsors were biased, they understood now the importance of Recall, but still, they had a preference for Precision. Thus they chose the F0.5 score, which is defined as thus:\n```\nF0.5 = ((1 + 0.5^2) * Precision * Recall) / (0.5^2 * Precision + Recall)\nF0.5 = (1.25 * Precision * Recall) / (0.25 * Precision + Recall)\n```\n\nHad they wanted, they could have also chosen the F2 score, which is biased towards Recall. But they didn't.\n```\nF2 = ((1 + 2^2) * Precision * Recall) / (2^2 * Precision + Recall)\nF2 = (5 * Precision * Recall) / (4 * Precision + Recall)\n```\n\nKaggle then reset the leaderboard. Ding! Ding! Round Two of the Competition!\n\n [Jason Brownlee](https://machinelearningmastery.com/) has done a more in-depth writeup of the F Score Metric here:\n- https://machinelearningmastery.com/fbeta-measure-for-machine-learning/"
  }
}