{
  "id": 390058,
  "title": "Problem test predictions",
  "url": "/competitions/rsna-breast-cancer-detection/discussion/390058",
  "author_name": "Yacine Bouaouni",
  "post_date": "2023-02-24T00:17:43.818000",
  "votes": 0,
  "comment_count": 4,
  "views": 0,
  "content": "<p>Hello,</p>\n<p>I keep getting a 0 score on the LB although my model on training seems to work fine. I noticed a lot of people have the same problem. Any idea how to fix this? <br>\nThank you !</p>",
  "messages": [
    {
      "id": 2158040,
      "postDate": "2023-02-24T15:16:43.227Z",
      "content": "<p>Found the problem. The code should take into consideration the hidden test set!</p>",
      "rawMarkdown": "Found the problem. The code should take into consideration the hidden test set!",
      "votes": 1
    },
    {
      "id": 2157756,
      "postDate": "2023-02-24T09:26:01.693Z",
      "content": "<p>I think 0 score means that all your predictions are zero. Maybe you should check that point.</p>",
      "rawMarkdown": "I think 0 score means that all your predictions are zero. Maybe you should check that point.",
      "votes": 2,
      "replies": [
        {
          "id": 2158150,
          "postDate": "2023-02-24T16:56:22.303Z",
          "content": "<p>agree.  from the pf1 equation, wen the true positive is 0, the final result is 0</p>\n<pre><code>def pfbeta(labels, predictions, beta):\n    y_true_count = 0\n    ctp = 0\n    cfp = 0\n\n    for idx in range(len(labels)):\n        prediction = min(max(predictions[idx], 0), 1)\n        if (labels[idx]):\n            y_true_count += 1\n            ctp += prediction\n        else:\n            cfp += prediction\n\n    beta_squared = beta * beta\n    c_precision = ctp / (ctp + cfp)\n    c_recall = ctp / y_true_count\n    if (c_precision &gt; 0 and c_recall &gt; 0):\n        result = (1 + beta_squared) * (c_precision * c_recall) / (beta_squared * c_precision + c_recall)\n        return result\n    else:\n        return 0\n</code></pre>",
          "rawMarkdown": "agree.  from the pf1 equation, wen the true positive is 0, the final result is 0\n\n```\ndef pfbeta(labels, predictions, beta):\n    y_true_count = 0\n    ctp = 0\n    cfp = 0\n\n    for idx in range(len(labels)):\n        prediction = min(max(predictions[idx], 0), 1)\n        if (labels[idx]):\n            y_true_count += 1\n            ctp += prediction\n        else:\n            cfp += prediction\n\n    beta_squared = beta * beta\n    c_precision = ctp / (ctp + cfp)\n    c_recall = ctp / y_true_count\n    if (c_precision > 0 and c_recall > 0):\n        result = (1 + beta_squared) * (c_precision * c_recall) / (beta_squared * c_precision + c_recall)\n        return result\n    else:\n        return 0\n\n```",
          "votes": 1
        }
      ]
    },
    {
      "id": 2157614,
      "postDate": "2023-02-24T07:15:05.717Z",
      "content": "<p>Can you share the notebook?</p>",
      "rawMarkdown": "Can you share the notebook?"
    },
    {
      "id": 2157354,
      "postDate": "2023-02-24T00:17:43.820Z",
      "content": "<p>Hello,</p>\n<p>I keep getting a 0 score on the LB although my model on training seems to work fine. I noticed a lot of people have the same problem. Any idea how to fix this? <br>\nThank you !</p>",
      "rawMarkdown": "Hello,\n\nI keep getting a 0 score on the LB although my model on training seems to work fine. I noticed a lot of people have the same problem. Any idea how to fix this? \nThank you !"
    }
  ],
  "comments": [
    {
      "id": 2158040,
      "author_name": "Yacine Bouaouni",
      "author_url": "",
      "post_date": "2023-02-24T15:16:43.227000",
      "content": "<p>Found the problem. The code should take into consideration the hidden test set!</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 2157756,
      "author_name": "junseonglee11",
      "author_url": "",
      "post_date": "2023-02-24T09:26:01.693000",
      "content": "<p>I think 0 score means that all your predictions are zero. Maybe you should check that point.</p>",
      "votes": 2,
      "replies": [
        {
          "id": 2158150,
          "author_name": "HongCheng",
          "author_url": "",
          "post_date": "2023-02-24T16:56:22.303000",
          "content": "<p>agree.  from the pf1 equation, wen the true positive is 0, the final result is 0</p>\n<pre><code>def pfbeta(labels, predictions, beta):\n    y_true_count = 0\n    ctp = 0\n    cfp = 0\n\n    for idx in range(len(labels)):\n        prediction = min(max(predictions[idx], 0), 1)\n        if (labels[idx]):\n            y_true_count += 1\n            ctp += prediction\n        else:\n            cfp += prediction\n\n    beta_squared = beta * beta\n    c_precision = ctp / (ctp + cfp)\n    c_recall = ctp / y_true_count\n    if (c_precision &gt; 0 and c_recall &gt; 0):\n        result = (1 + beta_squared) * (c_precision * c_recall) / (beta_squared * c_precision + c_recall)\n        return result\n    else:\n        return 0\n</code></pre>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 2157614,
      "author_name": "Kyle Graupe",
      "author_url": "",
      "post_date": "2023-02-24T07:15:05.717000",
      "content": "<p>Can you share the notebook?</p>",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2158040": "Found the problem. The code should take into consideration the hidden test set!",
    "2157756": "I think 0 score means that all your predictions are zero. Maybe you should check that point.",
    "2157614": "Can you share the notebook?",
    "2157354": "Hello,\n\nI keep getting a 0 score on the LB although my model on training seems to work fine. I noticed a lot of people have the same problem. Any idea how to fix this? \nThank you !"
  }
}