{
  "id": 466876,
  "title": "Predictions need to sum to 1 for every row",
  "url": "/competitions/hms-harmful-brain-activity-classification/discussion/466876",
  "author_name": "narsil (jobs-in-data.com)",
  "post_date": "2024-01-10T08:32:23.718000",
  "votes": 18,
  "comment_count": 8,
  "views": 0,
  "content": "<p>According to the metric implementation: <code>https://www.kaggle.com/code/metric/kullback-leibler-divergence/notebook</code>:</p>\n<blockquote>\n  <p>The predictions in each row must add to one</p>\n</blockquote>\n<p>It is not mentioned in the data description, but any <code>submission.csv</code> that does not fulfill this condition throws an error. It means that predictions are not rescaled automatically.</p>",
  "messages": [
    {
      "id": 2595087,
      "postDate": "2024-01-10T08:32:23.720Z",
      "content": "<p>According to the metric implementation: <code>https://www.kaggle.com/code/metric/kullback-leibler-divergence/notebook</code>:</p>\n<blockquote>\n  <p>The predictions in each row must add to one</p>\n</blockquote>\n<p>It is not mentioned in the data description, but any <code>submission.csv</code> that does not fulfill this condition throws an error. It means that predictions are not rescaled automatically.</p>",
      "rawMarkdown": "According to the metric implementation: `https://www.kaggle.com/code/metric/kullback-leibler-divergence/notebook`:\n\n>The predictions in each row must add to one\n\nIt is not mentioned in the data description, but any `submission.csv` that does not fulfill this condition throws an error. It means that predictions are not rescaled automatically.",
      "votes": 17
    },
    {
      "id": 2595914,
      "postDate": "2024-01-10T18:09:23.950Z",
      "content": "<p><a href=\"https://www.kaggle.com/narsil\" target=\"_blank\">@narsil</a> Thanks for the feedback. I've updated the description to make this constraint more explicit.</p>",
      "rawMarkdown": "@narsil Thanks for the feedback. I've updated the description to make this constraint more explicit.",
      "votes": 6
    },
    {
      "id": 2595518,
      "postDate": "2024-01-10T13:36:00.770Z",
      "content": "<p>Nice discovery Narsil. I think the Evaluation Tab needs to be updated because the <code>sample_submission.csv</code> example (<a href=\"https://www.kaggle.com/competitions/hms-harmful-brain-activity-classification/overview/evaluation\" target=\"_blank\">here</a>) that Kaggle provides does not add to one:</p>\n<pre><code>,seizure_vote,lpd_vote,gpd_vote,lrda_vote,grda_vote,other_vote\n,.,.,.,.,.,.\n,.,.,.,.,.,.\n.\n</code></pre>",
      "rawMarkdown": "Nice discovery Narsil. I think the Evaluation Tab needs to be updated because the `sample_submission.csv` example ([here][1]) that Kaggle provides does not add to one:\n\n    eeg_id,seizure_vote,lpd_vote,gpd_vote,lrda_vote,grda_vote,other_vote\n    0,0.166,0.166,0.166,0.166,0.166,0.166\n    1,0.166,0.166,0.166,0.166,0.166,0.166\n    etc.\n\n[1]: https://www.kaggle.com/competitions/hms-harmful-brain-activity-classification/overview/evaluation",
      "votes": 4,
      "replies": [
        {
          "id": 2595917,
          "postDate": "2024-01-10T18:09:52.633Z",
          "content": "<p>Fair enough, done.</p>",
          "rawMarkdown": "Fair enough, done.",
          "votes": 2,
          "replies": [
            {
              "id": 2595928,
              "postDate": "2024-01-10T18:17:24.387Z",
              "rawMarkdown": "",
              "isDeleted": true
            }
          ]
        }
      ]
    },
    {
      "id": 2623379,
      "postDate": "2024-01-28T07:37:09.797Z",
      "content": "<p>The total value is 1, but an error also occurs if the predicted value contains a negative value. Since we are predicting probabilities, it is not inherently possible for a negative value to be included, but I tried it and it was an error.</p>",
      "rawMarkdown": "The total value is 1, but an error also occurs if the predicted value contains a negative value. Since we are predicting probabilities, it is not inherently possible for a negative value to be included, but I tried it and it was an error.",
      "votes": 1
    },
    {
      "id": 2595122,
      "postDate": "2024-01-10T08:54:52.020Z",
      "content": "<p>So this is multiclass classification then. Can someone with domain knowledge confirm that labels are mutually exclusive?</p>",
      "rawMarkdown": "So this is multiclass classification then. Can someone with domain knowledge confirm that labels are mutually exclusive?",
      "replies": [
        {
          "id": 2595139,
          "postDate": "2024-01-10T09:09:57.803Z",
          "content": "<p>Also, </p>\n<blockquote>\n  <p>The KL divergence is technically undefined/infinite where the target equals zero.</p>\n</blockquote>\n<p>So it means that all the patients in the dataset have some type of a harmful brain activity. Our objective is to classify which one.</p>",
          "rawMarkdown": "Also, \n>The KL divergence is technically undefined/infinite where the target equals zero.\n\nSo it means that all the patients in the dataset have some type of a harmful brain activity. Our objective is to classify which one.",
          "votes": 4
        }
      ]
    },
    {
      "id": 2600670,
      "postDate": "2024-01-13T19:17:31.577Z",
      "content": "<p>Thanks for the info!</p>",
      "rawMarkdown": "Thanks for the info!"
    }
  ],
  "comments": [
    {
      "id": 2595914,
      "author_name": "Sohier Dane",
      "author_url": "",
      "post_date": "2024-01-10T18:09:23.950000",
      "content": "<p><a href=\"https://www.kaggle.com/narsil\" target=\"_blank\">@narsil</a> Thanks for the feedback. I've updated the description to make this constraint more explicit.</p>",
      "votes": 6,
      "replies": []
    },
    {
      "id": 2595518,
      "author_name": "Chris Deotte",
      "author_url": "",
      "post_date": "2024-01-10T13:36:00.770000",
      "content": "<p>Nice discovery Narsil. I think the Evaluation Tab needs to be updated because the <code>sample_submission.csv</code> example (<a href=\"https://www.kaggle.com/competitions/hms-harmful-brain-activity-classification/overview/evaluation\" target=\"_blank\">here</a>) that Kaggle provides does not add to one:</p>\n<pre><code>,seizure_vote,lpd_vote,gpd_vote,lrda_vote,grda_vote,other_vote\n,.,.,.,.,.,.\n,.,.,.,.,.,.\n.\n</code></pre>",
      "votes": 4,
      "replies": [
        {
          "id": 2595917,
          "author_name": "Sohier Dane",
          "author_url": "",
          "post_date": "2024-01-10T18:09:52.633000",
          "content": "<p>Fair enough, done.</p>",
          "votes": 2,
          "replies": [
            {
              "id": 2595928,
              "author_name": "",
              "author_url": "",
              "post_date": "2024-01-10T18:17:24.387000",
              "content": "",
              "votes": 0,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 2623379,
      "author_name": "tc0000",
      "author_url": "",
      "post_date": "2024-01-28T07:37:09.797000",
      "content": "<p>The total value is 1, but an error also occurs if the predicted value contains a negative value. Since we are predicting probabilities, it is not inherently possible for a negative value to be included, but I tried it and it was an error.</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 2595122,
      "author_name": "Gunes Evitan",
      "author_url": "",
      "post_date": "2024-01-10T08:54:52.020000",
      "content": "<p>So this is multiclass classification then. Can someone with domain knowledge confirm that labels are mutually exclusive?</p>",
      "votes": 0,
      "replies": [
        {
          "id": 2595139,
          "author_name": "narsil (jobs-in-data.com)",
          "author_url": "",
          "post_date": "2024-01-10T09:09:57.803000",
          "content": "<p>Also, </p>\n<blockquote>\n  <p>The KL divergence is technically undefined/infinite where the target equals zero.</p>\n</blockquote>\n<p>So it means that all the patients in the dataset have some type of a harmful brain activity. Our objective is to classify which one.</p>",
          "votes": 4,
          "replies": []
        }
      ]
    },
    {
      "id": 2600670,
      "author_name": "Ethan S. Lee",
      "author_url": "",
      "post_date": "2024-01-13T19:17:31.577000",
      "content": "<p>Thanks for the info!</p>",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2595087": "According to the metric implementation: `https://www.kaggle.com/code/metric/kullback-leibler-divergence/notebook`:\n\n>The predictions in each row must add to one\n\nIt is not mentioned in the data description, but any `submission.csv` that does not fulfill this condition throws an error. It means that predictions are not rescaled automatically.",
    "2595914": "@narsil Thanks for the feedback. I've updated the description to make this constraint more explicit.",
    "2595518": "Nice discovery Narsil. I think the Evaluation Tab needs to be updated because the `sample_submission.csv` example ([here][1]) that Kaggle provides does not add to one:\n\n    eeg_id,seizure_vote,lpd_vote,gpd_vote,lrda_vote,grda_vote,other_vote\n    0,0.166,0.166,0.166,0.166,0.166,0.166\n    1,0.166,0.166,0.166,0.166,0.166,0.166\n    etc.\n\n[1]: https://www.kaggle.com/competitions/hms-harmful-brain-activity-classification/overview/evaluation",
    "2623379": "The total value is 1, but an error also occurs if the predicted value contains a negative value. Since we are predicting probabilities, it is not inherently possible for a negative value to be included, but I tried it and it was an error.",
    "2595122": "So this is multiclass classification then. Can someone with domain knowledge confirm that labels are mutually exclusive?",
    "2600670": "Thanks for the info!"
  }
}