{
  "id": 397282,
  "title": "F0.5 score",
  "url": "/competitions/vesuvius-challenge-ink-detection/discussion/397282",
  "author_name": "",
  "post_date": "2023-03-24T21:10:28.631840300Z",
  "votes": 9,
  "comment_count": 1,
  "views": 0,
  "content": "<pre><code> sklearn.metrics  fbeta_score\nscore = fbeta_score(y_true, y_pred, beta=)\n</code></pre>\n<p><a href=\"https://scikit-learn.org/stable/modules/generated/sklearn.metrics.fbeta_score.html\" target=\"_blank\">https://scikit-learn.org/stable/modules/generated/sklearn.metrics.fbeta_score.html</a></p>",
  "messages": [
    {
      "id": "2195727",
      "postDate": "03/24/2023 21:10:28",
      "content": "<pre><code> sklearn.metrics  fbeta_score\nscore = fbeta_score(y_true, y_pred, beta=)\n</code></pre>\n<p><a href=\"https://scikit-learn.org/stable/modules/generated/sklearn.metrics.fbeta_score.html\" target=\"_blank\">https://scikit-learn.org/stable/modules/generated/sklearn.metrics.fbeta_score.html</a></p>",
      "rawMarkdown": "```python\nfrom sklearn.metrics import fbeta_score\nscore = fbeta_score(y_true, y_pred, beta=0.5)\n```\n\nhttps://scikit-learn.org/stable/modules/generated/sklearn.metrics.fbeta_score.html",
      "votes": null
    },
    {
      "id": "2197725",
      "postDate": "03/26/2023 11:07:45",
      "content": "<p>For those using <code>PyTorch</code>, you can use the <code>torchmetrics</code> implementation: </p>\n<p><a href=\"https://torchmetrics.readthedocs.io/en/stable/classification/fbeta_score.html\" target=\"_blank\">https://torchmetrics.readthedocs.io/en/stable/classification/fbeta_score.html</a></p>\n<p>For example:</p>\n<pre><code> torchmetrics.classification  BinaryFBetaScore\n\n\ntarget = torch.tensor([, , , , , ])\npreds = torch.tensor([, , , , , ])\n\n\nf_05 = BinaryFBetaScore(beta=)\n\n\n(f_05 (preds, target))\n</code></pre>",
      "rawMarkdown": "For those using `PyTorch`, you can use the `torchmetrics` implementation: \n\n\nhttps://torchmetrics.readthedocs.io/en/stable/classification/fbeta_score.html\n\nFor example:\n\n\n```python\n\nfrom torchmetrics.classification import BinaryFBetaScore\n\n\ntarget = torch.tensor([0, 1, 0, 1, 0, 1])\npreds = torch.tensor([0, 0, 1, 1, 0, 1])\n\n\nf_05 = BinaryFBetaScore(beta=0.5)\n\n\nprint(f_05 (preds, target))\n\n```",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2197725,
      "author_name": "yassinealouini",
      "author_url": "",
      "post_date": "03/26/2023 11:07:45",
      "content": "<p>For those using <code>PyTorch</code>, you can use the <code>torchmetrics</code> implementation: </p>\n<p><a href=\"https://torchmetrics.readthedocs.io/en/stable/classification/fbeta_score.html\" target=\"_blank\">https://torchmetrics.readthedocs.io/en/stable/classification/fbeta_score.html</a></p>\n<p>For example:</p>\n<pre><code> torchmetrics.classification  BinaryFBetaScore\n\n\ntarget = torch.tensor([, , , , , ])\npreds = torch.tensor([, , , , , ])\n\n\nf_05 = BinaryFBetaScore(beta=)\n\n\n(f_05 (preds, target))\n</code></pre>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2195727": "```python\nfrom sklearn.metrics import fbeta_score\nscore = fbeta_score(y_true, y_pred, beta=0.5)\n```\n\nhttps://scikit-learn.org/stable/modules/generated/sklearn.metrics.fbeta_score.html",
    "2197725": "For those using `PyTorch`, you can use the `torchmetrics` implementation: \n\n\nhttps://torchmetrics.readthedocs.io/en/stable/classification/fbeta_score.html\n\nFor example:\n\n\n```python\n\nfrom torchmetrics.classification import BinaryFBetaScore\n\n\ntarget = torch.tensor([0, 1, 0, 1, 0, 1])\npreds = torch.tensor([0, 0, 1, 1, 0, 1])\n\n\nf_05 = BinaryFBetaScore(beta=0.5)\n\n\nprint(f_05 (preds, target))\n\n```"
  },
  "source": "meta"
}