{
  "topic": {
    "id": 420241,
    "title": "(Probably) Error in the metric computation",
    "authorName": "Btbpanda",
    "commentCount": 7,
    "votes": 28,
    "postDate": "2023-06-29T21:02:17.072000"
  },
  "comments": [
    {
      "id": 2332432,
      "authorName": "Damiano Piovesan",
      "votes": 11,
      "postDate": "2023-07-06T07:38:09.450000",
      "content": "<p>Hello everyone,</p>\n<p>I want to express my gratitude for those who reported the bug and provided the fix. After investigating the issue, I can confirm that it was affecting the evaluation of non-propagated predictions and those where parents were predicted with lower scores than their children. This bug had a significant impact on the dashboard, and I apologize for any inconvenience it may have caused.</p>\n<p>I have pushed the fix to the main branch of the <a href=\"https://github.com/BioComputingUP/CAFA-evaluator\" target=\"_blank\">CAFA-evaluator repository</a>. The Kaggle team will now take over and recalculate the dashboard with the updated code. This process should happen as soon as possible, likely at the beginning of next week. They will communicate all the details and timeline on a pinned post.</p>"
    },
    {
      "id": 2324438,
      "authorName": "Ogurtsov",
      "votes": 1,
      "postDate": "2023-06-30T15:46:54.297000",
      "content": "<blockquote>\n  <p>The submission metric value depends on rows order</p>\n</blockquote>\n<p>No, LB metric is not order-sensitive.</p>"
    },
    {
      "id": 2324570,
      "authorName": "Btbpanda",
      "votes": 2,
      "postDate": "2023-06-30T17:36:26.020000",
      "content": "<p>If you mean, that shuffling the predictions doesn't affect your score, you are right. But the order of ground truth matters here. This is the part of <code>pred_parser</code> function: </p>\n<pre><code>     (pred_file)  f:\n         line  f:\n            line = line.strip().split()\n             line  (line) &gt; :\n                p_id, term_id, prob = line[:]\n                ns = ns_dict.get(term_id)\n                 ns  gts  p_id  gts[ns].ids:\n                    i = gts[ns].ids[p_id]\n                     max_terms    np.count_nonzero(matrix[ns][i]) &lt;= max_terms:\n                        j = onts[ns].terms_dict.get(term_id)[]\n                        ids[ns][p_id] = i\n                        matrix[ns][i, j] = (matrix[ns][i, j], (prob))\n</code></pre>\n<p>Here <code>i</code> is the row number in the prediction matrix. They are trying to obtain it from <code>gts</code> dict if the protein id <code>p_id</code> is there. So the order of prediction is defined by the ground truth file, which is parsed first. And I believe, if ones the organizers shuffle their targets, scores will be changed at least a little. Anyway, even if you freeze all the orders, I just follow the <code>propagate</code> function logic, and I suppose it is not a desired behavior. </p>"
    },
    {
      "id": 2328323,
      "authorName": "Alexander Chervov",
      "votes": 2,
      "postDate": "2023-07-03T13:59:53.683000",
      "content": "<p>To add more examples: <img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2262596%2Fc56fd08247bc1cfeb3b3883cb1e7e91a%2Fmetric.png?generation=1688392382886578&amp;alt=media\" alt=\"\"></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2262596%2F6d66f303d33711db202fe24e0b2f6561%2Fmetric2.png?generation=1688392666181201&amp;alt=media\" alt=\"\"></p>\n<p>The difference in scores can be quite big. <br>\nAs OP proposed it might depends on the order of the columns of \"Y\",<br>\nhere the order of Y columns is not by the number of \"1\", but different<br>\n(taken from Zoltan's script: \"Combine embeddings\") </p>"
    },
    {
      "id": 2328347,
      "authorName": "Evans",
      "votes": 3,
      "postDate": "2023-07-03T14:19:35.663000",
      "content": "<p>This might only happen to those who do not perform parent propagation prior to the submission.<br>\nI just checked my propagated version results, and this correction has no effect on the evaluation scoring.</p>"
    },
    {
      "id": 2324621,
      "authorName": "Evans",
      "votes": 2,
      "postDate": "2023-06-30T18:14:24.220000",
      "content": "<p>Thanks for pointing this out.<br>\nI believe you are correct, this would also fill protein with max child predictions of the first row.<br>\nUsing the following demo as an example,<br>\nassuming that col 1 is the term we are doing propagation, and col 2,3,4 are col 1's children.<br>\nThe correct value for row1 (protein1) should be 7 and for row2 (protein2) should be 12.<br>\nHowever, using the provided code, both of them are 7. <br>\nYour solution would fix this problem.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F13769621%2F2a10c93cfa56e6e36ffcc96e659b755a%2FScreenshot%202023-06-30%20140952.png?generation=1688148606000433&amp;alt=media\" alt=\"\"></p>"
    },
    {
      "id": 2324536,
      "authorName": "Sohier Dane",
      "votes": 2,
      "postDate": "2023-06-30T17:03:36.233000",
      "content": "<p>We'll take a look at this but since we're heading into July 4th weekend I don't expect that we'll be able to get back to you until the middle of next week.</p>"
    }
  ],
  "index": {
    "id": "420241",
    "title": "(Probably) Error in the metric computation",
    "authorName": "",
    "commentCount": "7",
    "votes": "28",
    "postDate": "2023-06-29 21:02:17.072000"
  },
  "competition": "cafa-5-protein-function-prediction"
}