{
  "id": 238710,
  "title": "Class Imbalance Issue",
  "url": "/competitions/seti-breakthrough-listen/discussion/238710",
  "author_name": "Parth Dhameliya",
  "post_date": "2021-05-13T07:15:21.782000",
  "votes": 5,
  "comment_count": 1,
  "views": 0,
  "content": "<ul>\n<li>In the train dataset, we see major class imbalance positive examples(1) are less than the negative example(0).</li>\n<li>To tackle class imbalance<ol>\n<li>Proper Loss function selection, <a href=\"https://www.kaggle.com/parthdhameliya77/class-imbalance-weighted-binary-cross-entropy\" target=\"_blank\">weighted bce</a> might help to tackle.</li>\n<li>Resampling to achieve balanced classes</li>\n<li>Augmenting a particular class may help </li></ol></li>\n</ul>",
  "messages": [
    {
      "id": 1305248,
      "postDate": "2021-05-13T07:15:21.783Z",
      "content": "<ul>\n<li>In the train dataset, we see major class imbalance positive examples(1) are less than the negative example(0).</li>\n<li>To tackle class imbalance<ol>\n<li>Proper Loss function selection, <a href=\"https://www.kaggle.com/parthdhameliya77/class-imbalance-weighted-binary-cross-entropy\" target=\"_blank\">weighted bce</a> might help to tackle.</li>\n<li>Resampling to achieve balanced classes</li>\n<li>Augmenting a particular class may help </li></ol></li>\n</ul>",
      "rawMarkdown": "- In the train dataset, we see major class imbalance positive examples(1) are less than the negative example(0).\n- To tackle class imbalance\n    1. Proper Loss function selection, [weighted bce](https://www.kaggle.com/parthdhameliya77/class-imbalance-weighted-binary-cross-entropy) might help to tackle.\n    2. Resampling to achieve balanced classes\n    3. Augmenting a particular class may help ",
      "votes": 5
    },
    {
      "id": 1341544,
      "postDate": "2021-06-08T17:53:56.913Z",
      "content": "<p>We can also try using focal loss</p>\n<p>Originally proposed for object detection, but we can also use this for any other use case. More about it <a href=\"https://amaarora.github.io/2020/06/29/FocalLoss.html\" target=\"_blank\">here</a><br>\n<a href=\"https://github.com/AdeelH/pytorch-multi-class-focal-loss\" target=\"_blank\">Here</a> is how you can use this in Pytorch for multi-class classification<br>\n<a href=\"https://github.com/umbertogriffo/focal-loss-keras\" target=\"_blank\">Here</a> is how you can use this in Keras</p>",
      "rawMarkdown": "We can also try using focal loss\n\nOriginally proposed for object detection, but we can also use this for any other use case. More about it [here](https://amaarora.github.io/2020/06/29/FocalLoss.html)\n[Here](https://github.com/AdeelH/pytorch-multi-class-focal-loss) is how you can use this in Pytorch for multi-class classification\n[Here](https://github.com/umbertogriffo/focal-loss-keras) is how you can use this in Keras"
    }
  ],
  "comments": [
    {
      "id": 1341544,
      "author_name": "Devashish Prasad",
      "author_url": "",
      "post_date": "2021-06-08T17:53:56.913000",
      "content": "<p>We can also try using focal loss</p>\n<p>Originally proposed for object detection, but we can also use this for any other use case. More about it <a href=\"https://amaarora.github.io/2020/06/29/FocalLoss.html\" target=\"_blank\">here</a><br>\n<a href=\"https://github.com/AdeelH/pytorch-multi-class-focal-loss\" target=\"_blank\">Here</a> is how you can use this in Pytorch for multi-class classification<br>\n<a href=\"https://github.com/umbertogriffo/focal-loss-keras\" target=\"_blank\">Here</a> is how you can use this in Keras</p>",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1305248": "- In the train dataset, we see major class imbalance positive examples(1) are less than the negative example(0).\n- To tackle class imbalance\n    1. Proper Loss function selection, [weighted bce](https://www.kaggle.com/parthdhameliya77/class-imbalance-weighted-binary-cross-entropy) might help to tackle.\n    2. Resampling to achieve balanced classes\n    3. Augmenting a particular class may help ",
    "1341544": "We can also try using focal loss\n\nOriginally proposed for object detection, but we can also use this for any other use case. More about it [here](https://amaarora.github.io/2020/06/29/FocalLoss.html)\n[Here](https://github.com/AdeelH/pytorch-multi-class-focal-loss) is how you can use this in Pytorch for multi-class classification\n[Here](https://github.com/umbertogriffo/focal-loss-keras) is how you can use this in Keras"
  }
}