{
  "id": 499990,
  "title": "Focal Loss parameters better with negative weighting",
  "url": "/competitions/birdclef-2024/discussion/499990",
  "author_name": "snehal",
  "post_date": "2024-05-03T19:32:15.311000",
  "votes": 5,
  "comment_count": 0,
  "views": 0,
  "content": "<p>I did an experiment with to test whether alpha for focal loss is better at 0.25 (weight negative samples more) or 0.75 (weight positive samples more) and weighting negative samples performed better (+0.03LB) despite far more negative examples in train set. I’m not sure why this is the case anyone have any thoughts? Maybe I am misunderstanding how focal loss works.</p>",
  "messages": [
    {
      "id": 2791670,
      "postDate": "2024-05-03T19:32:15.310Z",
      "content": "<p>I did an experiment with to test whether alpha for focal loss is better at 0.25 (weight negative samples more) or 0.75 (weight positive samples more) and weighting negative samples performed better (+0.03LB) despite far more negative examples in train set. I’m not sure why this is the case anyone have any thoughts? Maybe I am misunderstanding how focal loss works.</p>",
      "rawMarkdown": "I did an experiment with to test whether alpha for focal loss is better at 0.25 (weight negative samples more) or 0.75 (weight positive samples more) and weighting negative samples performed better (+0.03LB) despite far more negative examples in train set. I’m not sure why this is the case anyone have any thoughts? Maybe I am misunderstanding how focal loss works.",
      "votes": 4
    }
  ],
  "comments": [],
  "raw_markdown_by_id": {
    "2791670": "I did an experiment with to test whether alpha for focal loss is better at 0.25 (weight negative samples more) or 0.75 (weight positive samples more) and weighting negative samples performed better (+0.03LB) despite far more negative examples in train set. I’m not sure why this is the case anyone have any thoughts? Maybe I am misunderstanding how focal loss works."
  }
}