{
  "id": 290910,
  "title": "F2 /Fbeta implementation as a metric like class",
  "url": "/competitions/tensorflow-great-barrier-reef/discussion/290910",
  "author_name": "KingF3d",
  "post_date": "2021-11-26T18:07:18.273000",
  "votes": 5,
  "comment_count": 0,
  "views": 0,
  "content": "<p>Hello all, </p>\n<p>I didn't find any implementation of Fbeta score that really suited me so I implemented mine here: <a href=\"https://www.kaggle.com/kingfed/implementation-f-beta\" target=\"_blank\">https://www.kaggle.com/kingfed/implementation-f-beta</a></p>\n<p>This implementation is inspired by the kind of metric classes we often see in framework like Keras or Fastai so it should be quite easy to integrate it with these frameworks.<br>\nI also wanted something a bit generic so this metric can adapt to a multi-label problem and returns the Fbeta score for each label. Then you can compute the average Fbeta score or do whatever aggregation you'd like.</p>\n<p>I did a bit of unit testing but it's far from solid testing.</p>",
  "messages": [
    {
      "id": 1596680,
      "postDate": "2021-11-26T18:07:18.273Z",
      "content": "<p>Hello all, </p>\n<p>I didn't find any implementation of Fbeta score that really suited me so I implemented mine here: <a href=\"https://www.kaggle.com/kingfed/implementation-f-beta\" target=\"_blank\">https://www.kaggle.com/kingfed/implementation-f-beta</a></p>\n<p>This implementation is inspired by the kind of metric classes we often see in framework like Keras or Fastai so it should be quite easy to integrate it with these frameworks.<br>\nI also wanted something a bit generic so this metric can adapt to a multi-label problem and returns the Fbeta score for each label. Then you can compute the average Fbeta score or do whatever aggregation you'd like.</p>\n<p>I did a bit of unit testing but it's far from solid testing.</p>",
      "rawMarkdown": "Hello all, \n\nI didn't find any implementation of Fbeta score that really suited me so I implemented mine here: https://www.kaggle.com/kingfed/implementation-f-beta\n\nThis implementation is inspired by the kind of metric classes we often see in framework like Keras or Fastai so it should be quite easy to integrate it with these frameworks.\nI also wanted something a bit generic so this metric can adapt to a multi-label problem and returns the Fbeta score for each label. Then you can compute the average Fbeta score or do whatever aggregation you'd like.\n\nI did a bit of unit testing but it's far from solid testing.",
      "votes": 5
    }
  ],
  "comments": [],
  "raw_markdown_by_id": {
    "1596680": "Hello all, \n\nI didn't find any implementation of Fbeta score that really suited me so I implemented mine here: https://www.kaggle.com/kingfed/implementation-f-beta\n\nThis implementation is inspired by the kind of metric classes we often see in framework like Keras or Fastai so it should be quite easy to integrate it with these frameworks.\nI also wanted something a bit generic so this metric can adapt to a multi-label problem and returns the Fbeta score for each label. Then you can compute the average Fbeta score or do whatever aggregation you'd like.\n\nI did a bit of unit testing but it's far from solid testing."
  }
}