{
  "id": 345902,
  "title": "Submission Scoring Error on Previous Two Submissions, Now What?",
  "url": "/competitions/mayo-clinic-strip-ai/discussion/345902",
  "author_name": "Dino Wun",
  "post_date": "2022-08-17T03:35:23.190000",
  "votes": 3,
  "comment_count": 1,
  "views": 0,
  "content": "<p>Since I fixed my submission from my model ensembler, I faced two \"Submission Scoring Error\" problems. The first one showed that the predictions were duplicated in <code>patient_id</code> and the number of digits in my submission. And since I used Jirka's way of debugging this error, the \"Submission Scoring Error\" came back and hit me like a train. So, what caused the Submission Scoring Error on my submissions over my model ensembler, especially when following Jirka's way of solving this error?</p>",
  "messages": [
    {
      "id": 1902994,
      "postDate": "2022-08-17T03:35:23.190Z",
      "content": "<p>Since I fixed my submission from my model ensembler, I faced two \"Submission Scoring Error\" problems. The first one showed that the predictions were duplicated in <code>patient_id</code> and the number of digits in my submission. And since I used Jirka's way of debugging this error, the \"Submission Scoring Error\" came back and hit me like a train. So, what caused the Submission Scoring Error on my submissions over my model ensembler, especially when following Jirka's way of solving this error?</p>",
      "rawMarkdown": "Since I fixed my submission from my model ensembler, I faced two \"Submission Scoring Error\" problems. The first one showed that the predictions were duplicated in `patient_id` and the number of digits in my submission. And since I used Jirka's way of debugging this error, the \"Submission Scoring Error\" came back and hit me like a train. So, what caused the Submission Scoring Error on my submissions over my model ensembler, especially when following Jirka's way of solving this error?",
      "votes": 3
    },
    {
      "id": 1905030,
      "postDate": "2022-08-18T17:36:37.353Z",
      "content": "<p>Be sure your probabilities are not negative. You can do something like that (softmax will take care of it):</p>\n<pre><code>    model.eval()\n    with torch.no_grad():\n        predictions = model(input)\n        raw_probabilities = torch.softmax(torch.mean(predictions.to('cpu'), dim=0), dim=0)\n        row_p_CE = raw_probabilities[0].item()\n        row_p_LAA = raw_probabilities[1].item()\n        output_df = output_df.append({'patient_id':patient_id, 'CE':row_p_CE, 'LAA':row_p_LAA}, ignore_index=True)\n\n    (...)\n\n    output_df = output_df.groupby(\"patient_id\").mean().round(6)\n</code></pre>",
      "rawMarkdown": "Be sure your probabilities are not negative. You can do something like that (softmax will take care of it):\n\n```\n    model.eval()\n    with torch.no_grad():\n        predictions = model(input)\n        raw_probabilities = torch.softmax(torch.mean(predictions.to('cpu'), dim=0), dim=0)\n        row_p_CE = raw_probabilities[0].item()\n        row_p_LAA = raw_probabilities[1].item()\n        output_df = output_df.append({'patient_id':patient_id, 'CE':row_p_CE, 'LAA':row_p_LAA}, ignore_index=True)\n    \n    (...)\n    \n    output_df = output_df.groupby(\"patient_id\").mean().round(6)\n```\n",
      "votes": 1
    }
  ],
  "comments": [
    {
      "id": 1905030,
      "author_name": "AIGeekProgrammer",
      "author_url": "",
      "post_date": "2022-08-18T17:36:37.353000",
      "content": "<p>Be sure your probabilities are not negative. You can do something like that (softmax will take care of it):</p>\n<pre><code>    model.eval()\n    with torch.no_grad():\n        predictions = model(input)\n        raw_probabilities = torch.softmax(torch.mean(predictions.to('cpu'), dim=0), dim=0)\n        row_p_CE = raw_probabilities[0].item()\n        row_p_LAA = raw_probabilities[1].item()\n        output_df = output_df.append({'patient_id':patient_id, 'CE':row_p_CE, 'LAA':row_p_LAA}, ignore_index=True)\n\n    (...)\n\n    output_df = output_df.groupby(\"patient_id\").mean().round(6)\n</code></pre>",
      "votes": 1,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1902994": "Since I fixed my submission from my model ensembler, I faced two \"Submission Scoring Error\" problems. The first one showed that the predictions were duplicated in `patient_id` and the number of digits in my submission. And since I used Jirka's way of debugging this error, the \"Submission Scoring Error\" came back and hit me like a train. So, what caused the Submission Scoring Error on my submissions over my model ensembler, especially when following Jirka's way of solving this error?",
    "1905030": "Be sure your probabilities are not negative. You can do something like that (softmax will take care of it):\n\n```\n    model.eval()\n    with torch.no_grad():\n        predictions = model(input)\n        raw_probabilities = torch.softmax(torch.mean(predictions.to('cpu'), dim=0), dim=0)\n        row_p_CE = raw_probabilities[0].item()\n        row_p_LAA = raw_probabilities[1].item()\n        output_df = output_df.append({'patient_id':patient_id, 'CE':row_p_CE, 'LAA':row_p_LAA}, ignore_index=True)\n    \n    (...)\n    \n    output_df = output_df.groupby(\"patient_id\").mean().round(6)\n```\n"
  }
}