{
  "id": 168332,
  "title": "How to compute multi label class weight?",
  "url": "/competitions/siim-isic-melanoma-classification/discussion/168332",
  "author_name": "",
  "post_date": "2020-07-20T07:12:51.213775900Z",
  "votes": null,
  "comment_count": 4,
  "views": 0,
  "content": "<p>In imbalanced data, I want to use weight class.<br>\nBut I don't know how to compute that.<br>\nAnd I found some example but that is about binary class.<br>\nCan you advise to me about multi label class weight?</p>",
  "messages": [
    {
      "id": "936378",
      "postDate": "07/20/2020 07:12:51",
      "content": "<p>In imbalanced data, I want to use weight class.<br>\nBut I don't know how to compute that.<br>\nAnd I found some example but that is about binary class.<br>\nCan you advise to me about multi label class weight?</p>",
      "rawMarkdown": "In imbalanced data, I want to use weight class.\nBut I don't know how to compute that.\nAnd I found some example but that is about binary class.\nCan you advise to me about multi label class weight?",
      "votes": null
    },
    {
      "id": "936387",
      "postDate": "07/20/2020 07:20:11",
      "content": "<p><a href=\"https://stackoverflow.com/questions/44560549/unbalanced-data-and-weighted-cross-entropy\">This</a> and <a href=\"https://pytorch.org/docs/master/generated/torch.nn.CrossEntropyLoss.html\">this(If you are using pytorch)</a> should help! :)</p>",
      "rawMarkdown": "[This](https://stackoverflow.com/questions/44560549/unbalanced-data-and-weighted-cross-entropy) and [this(If you are using pytorch)](https://pytorch.org/docs/master/generated/torch.nn.CrossEntropyLoss.html) should help! :)",
      "votes": null
    },
    {
      "id": "936388",
      "postDate": "07/20/2020 07:21:21",
      "content": "<p>Oh ! Really Thank you! :)</p>",
      "rawMarkdown": "Oh ! Really Thank you! :)",
      "votes": null
    },
    {
      "id": "936435",
      "postDate": "07/20/2020 08:09:26",
      "content": "<p>As you can see in my <a href=\"https://www.kaggle.com/c/siim-isic-melanoma-classification/discussion/167215\">updated test data distribution</a> post,\nuse weights 260/10982 (corresponding to test data, instead of 584/33126 of train data)</p>\n\n<p>However, if you are labeling SK, BCC, SCC, etc; then you only have <a href=\"https://www.kaggle.com/c/siim-isic-melanoma-classification/discussion/164617#918108\">corresponding weights of training set</a> because we do not know the test data diagnosis details.</p>",
      "rawMarkdown": "As you can see in my [updated test data distribution](https://www.kaggle.com/c/siim-isic-melanoma-classification/discussion/167215) post,\nuse weights 260/10982 (corresponding to test data, instead of 584/33126 of train data)\n\nHowever, if you are labeling SK, BCC, SCC, etc; then you only have [corresponding weights of training set](https://www.kaggle.com/c/siim-isic-melanoma-classification/discussion/164617#918108) because we do not know the test data diagnosis details.",
      "votes": null
    },
    {
      "id": "936602",
      "postDate": "07/20/2020 10:50:58",
      "content": "<p>Thank you!!!</p>",
      "rawMarkdown": "Thank you!!!",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 936387,
      "author_name": "sarques",
      "author_url": "",
      "post_date": "07/20/2020 07:20:11",
      "content": "<p><a href=\"https://stackoverflow.com/questions/44560549/unbalanced-data-and-weighted-cross-entropy\">This</a> and <a href=\"https://pytorch.org/docs/master/generated/torch.nn.CrossEntropyLoss.html\">this(If you are using pytorch)</a> should help! :)</p>",
      "votes": null,
      "replies": [
        {
          "id": 936388,
          "author_name": "zxzxs9182",
          "author_url": "",
          "post_date": "07/20/2020 07:21:21",
          "content": "<p>Oh ! Really Thank you! :)</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 936435,
      "author_name": "sirishks",
      "author_url": "",
      "post_date": "07/20/2020 08:09:26",
      "content": "<p>As you can see in my <a href=\"https://www.kaggle.com/c/siim-isic-melanoma-classification/discussion/167215\">updated test data distribution</a> post,\nuse weights 260/10982 (corresponding to test data, instead of 584/33126 of train data)</p>\n\n<p>However, if you are labeling SK, BCC, SCC, etc; then you only have <a href=\"https://www.kaggle.com/c/siim-isic-melanoma-classification/discussion/164617#918108\">corresponding weights of training set</a> because we do not know the test data diagnosis details.</p>",
      "votes": null,
      "replies": [
        {
          "id": 936602,
          "author_name": "zxzxs9182",
          "author_url": "",
          "post_date": "07/20/2020 10:50:58",
          "content": "<p>Thank you!!!</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "936378": "In imbalanced data, I want to use weight class.\nBut I don't know how to compute that.\nAnd I found some example but that is about binary class.\nCan you advise to me about multi label class weight?",
    "936387": "[This](https://stackoverflow.com/questions/44560549/unbalanced-data-and-weighted-cross-entropy) and [this(If you are using pytorch)](https://pytorch.org/docs/master/generated/torch.nn.CrossEntropyLoss.html) should help! :)",
    "936388": "Oh ! Really Thank you! :)",
    "936435": "As you can see in my [updated test data distribution](https://www.kaggle.com/c/siim-isic-melanoma-classification/discussion/167215) post,\nuse weights 260/10982 (corresponding to test data, instead of 584/33126 of train data)\n\nHowever, if you are labeling SK, BCC, SCC, etc; then you only have [corresponding weights of training set](https://www.kaggle.com/c/siim-isic-melanoma-classification/discussion/164617#918108) because we do not know the test data diagnosis details.",
    "936602": "Thank you!!!"
  },
  "source": "meta"
}