{
  "id": 419545,
  "title": "Question about the fill mode Propagation",
  "url": "/competitions/cafa-5-protein-function-prediction/discussion/419545",
  "author_name": "",
  "post_date": "2023-06-26T12:47:57.069836100Z",
  "votes": 3,
  "comment_count": 1,
  "views": 0,
  "content": "<p>Hi all,</p>\n<p>The code of <code>fill</code> mode propagation in the <a href=\"https://github.com/BioComputingUP/CAFA-evaluator/blob/81f6d0382531d85f5df868b272ec6a7fbcfd2ae0/src/graph.py#L163\" target=\"_blank\">official evaluation repo</a> has</p>\n<pre><code>rows = np.where(matrix[:, i] == )[]\n rows.size:\n    idx = np.ix_(rows, cols)\n    matrix[rows, i] = matrix[idx].(axis=)[]\n</code></pre>\n<p>It seems that the right hand side of the last line is a scalar, but the left hand side is a vector.<br>\nWon't it set different samples to the same value? Should it be without <code>[0]</code>?<br>\nI'm confused what <code>fill</code> mode is trying to achieve.</p>",
  "messages": [
    {
      "id": "2318561",
      "postDate": "06/26/2023 12:47:57",
      "content": "<p>Hi all,</p>\n<p>The code of <code>fill</code> mode propagation in the <a href=\"https://github.com/BioComputingUP/CAFA-evaluator/blob/81f6d0382531d85f5df868b272ec6a7fbcfd2ae0/src/graph.py#L163\" target=\"_blank\">official evaluation repo</a> has</p>\n<pre><code>rows = np.where(matrix[:, i] == )[]\n rows.size:\n    idx = np.ix_(rows, cols)\n    matrix[rows, i] = matrix[idx].(axis=)[]\n</code></pre>\n<p>It seems that the right hand side of the last line is a scalar, but the left hand side is a vector.<br>\nWon't it set different samples to the same value? Should it be without <code>[0]</code>?<br>\nI'm confused what <code>fill</code> mode is trying to achieve.</p>",
      "rawMarkdown": "Hi all,\n\nThe code of `fill` mode propagation in the [official evaluation repo](https://github.com/BioComputingUP/CAFA-evaluator/blob/81f6d0382531d85f5df868b272ec6a7fbcfd2ae0/src/graph.py#L163) has\n\n```python\nrows = np.where(matrix[:, i] == 0)[0]\nif rows.size:\n    idx = np.ix_(rows, cols)\n    matrix[rows, i] = matrix[idx].max(axis=1)[0]\n```\n\nIt seems that the right hand side of the last line is a scalar, but the left hand side is a vector.\nWon't it set different samples to the same value? Should it be without `[0]`?\nI'm confused what `fill` mode is trying to achieve.",
      "votes": null
    },
    {
      "id": "2332439",
      "postDate": "07/06/2023 07:39:51",
      "content": "<p>Hi,</p>\n<p>Thanks for reporting. Please see my answer in <a href=\"https://www.kaggle.com/competitions/cafa-5-protein-function-prediction/discussion/420241\" target=\"_blank\">this</a> post.</p>",
      "rawMarkdown": "Hi,\n\nThanks for reporting. Please see my answer in [this](https://www.kaggle.com/competitions/cafa-5-protein-function-prediction/discussion/420241) post.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2332439,
      "author_name": "damianopiovesan",
      "author_url": "",
      "post_date": "07/06/2023 07:39:51",
      "content": "<p>Hi,</p>\n<p>Thanks for reporting. Please see my answer in <a href=\"https://www.kaggle.com/competitions/cafa-5-protein-function-prediction/discussion/420241\" target=\"_blank\">this</a> post.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2318561": "Hi all,\n\nThe code of `fill` mode propagation in the [official evaluation repo](https://github.com/BioComputingUP/CAFA-evaluator/blob/81f6d0382531d85f5df868b272ec6a7fbcfd2ae0/src/graph.py#L163) has\n\n```python\nrows = np.where(matrix[:, i] == 0)[0]\nif rows.size:\n    idx = np.ix_(rows, cols)\n    matrix[rows, i] = matrix[idx].max(axis=1)[0]\n```\n\nIt seems that the right hand side of the last line is a scalar, but the left hand side is a vector.\nWon't it set different samples to the same value? Should it be without `[0]`?\nI'm confused what `fill` mode is trying to achieve.",
    "2332439": "Hi,\n\nThanks for reporting. Please see my answer in [this](https://www.kaggle.com/competitions/cafa-5-protein-function-prediction/discussion/420241) post."
  },
  "source": "meta"
}