{
  "id": 569816,
  "title": "[Update] What is your CV score?",
  "url": "/competitions/el-hackathon-2025/discussion/569816",
  "author_name": "",
  "post_date": "2025-03-24T10:27:41.613675400Z",
  "votes": 4,
  "comment_count": 3,
  "views": 0,
  "content": "<p>My metric is spearman_corr metric</p>\n<pre><code>def spearman_rank_correlation(, ):\n    return (x, y).correlation\n\ndef (preds, target):\n    N = (preds)\n    correlations = [(preds[i], target[i]) for i in ((N))]\n    return np.(correlations)\n</code></pre>\n<p>Today CV score is 0.438 (LB is 0.64730) (Group K Fold, k = 5)</p>\n<p>My best CV score is 0.44. (LB score is 56878) (Group K Fold, k = 5)</p>\n<p>Past: CV 0.19842 - LB 0.28582</p>",
  "messages": [
    {
      "id": "3158213",
      "postDate": "03/24/2025 10:27:41",
      "content": "<p>My metric is spearman_corr metric</p>\n<pre><code>def spearman_rank_correlation(, ):\n    return (x, y).correlation\n\ndef (preds, target):\n    N = (preds)\n    correlations = [(preds[i], target[i]) for i in ((N))]\n    return np.(correlations)\n</code></pre>\n<p>Today CV score is 0.438 (LB is 0.64730) (Group K Fold, k = 5)</p>\n<p>My best CV score is 0.44. (LB score is 56878) (Group K Fold, k = 5)</p>\n<p>Past: CV 0.19842 - LB 0.28582</p>",
      "rawMarkdown": "My metric is spearman_corr metric\n\n```code\ndef spearman_rank_correlation(x, y):\n    return spearmanr(x, y).correlation\n    \ndef spearman_corr(preds, target):\n    N = len(preds)\n    correlations = [spearman_rank_correlation(preds[i], target[i]) for i in tqdm(range(N))]\n    return np.mean(correlations)\n```\nToday CV score is 0.438 (LB is 0.64730) (Group K Fold, k = 5)\n\nMy best CV score is 0.44. (LB score is 56878) (Group K Fold, k = 5)\n\nPast: CV 0.19842 - LB 0.28582",
      "votes": null
    },
    {
      "id": "3159974",
      "postDate": "03/26/2025 06:59:06",
      "content": "<p>Using the spearman correlation is clever, because the competition score is calculated that way. In theory, instead of predicting the actual abundance scores, we could just predict their ranks - which cells have lower abundancy, and which ones have higher. </p>",
      "rawMarkdown": "Using the spearman correlation is clever, because the competition score is calculated that way. In theory, instead of predicting the actual abundance scores, we could just predict their ranks - which cells have lower abundancy, and which ones have higher.",
      "votes": null
    },
    {
      "id": "3161871",
      "postDate": "03/28/2025 14:30:14",
      "content": "<p>At the end of this long notebook I wrote a few utility functions to verify a submission file: <a href=\"https://www.kaggle.com/code/dalloliogm/eda-exploring-cell-type-abundance#A-function-to-verify-whether-a-submission-file-is-plausible,-based-on-neighbour-ranks\" target=\"_blank\">https://www.kaggle.com/code/dalloliogm/eda-exploring-cell-type-abundance#A-function-to-verify-whether-a-submission-file-is-plausible,-based-on-neighbour-ranks</a></p>\n<p>The function <code>score_submission_with_global_consistency</code> verifies that:</p>\n<ul>\n<li>the relative ranks of the cell types are compatible with the other slides. For example, cell type 30 is often the most abundant cell type in the slide; while 1, 5, and others are often rare</li>\n<li>the relative rank of each cell type is compatible with its neighbour spots. This is based on the assumption that cells of the same type should be close to each other. It may be correct for some cell types, and wrong for others.</li>\n</ul>\n<p>The function also plots the submission file. I think that for this challenge, plotting is very useful.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F650%2Fb223434ab8b71d161edd652e604a6978%2F__results___40_1.png?generation=1743172227048497&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "At the end of this long notebook I wrote a few utility functions to verify a submission file: https://www.kaggle.com/code/dalloliogm/eda-exploring-cell-type-abundance#A-function-to-verify-whether-a-submission-file-is-plausible,-based-on-neighbour-ranks\n\nThe function `score_submission_with_global_consistency` verifies that:\n- the relative ranks of the cell types are compatible with the other slides. For example, cell type 30 is often the most abundant cell type in the slide; while 1, 5, and others are often rare\n- the relative rank of each cell type is compatible with its neighbour spots. This is based on the assumption that cells of the same type should be close to each other. It may be correct for some cell types, and wrong for others.\n\nThe function also plots the submission file. I think that for this challenge, plotting is very useful.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F650%2Fb223434ab8b71d161edd652e604a6978%2F__results___40_1.png?generation=1743172227048497&alt=media)",
      "votes": null
    },
    {
      "id": "3177451",
      "postDate": "04/12/2025 19:07:36",
      "content": "<p>Now that it's been extended for another month, it would be informative especially for those joining late.<br>\nMy best single model's OOF Spearman score is 0.6792 (using every slide as validation). <br>\nLB 0.6175</p>",
      "rawMarkdown": "Now that it's been extended for another month, it would be informative especially for those joining late.\nMy best single model's OOF Spearman score is 0.6792 (using every slide as validation). \nLB 0.6175",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 3159974,
      "author_name": "dalloliogm",
      "author_url": "",
      "post_date": "03/26/2025 06:59:06",
      "content": "<p>Using the spearman correlation is clever, because the competition score is calculated that way. In theory, instead of predicting the actual abundance scores, we could just predict their ranks - which cells have lower abundancy, and which ones have higher. </p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 3161871,
      "author_name": "dalloliogm",
      "author_url": "",
      "post_date": "03/28/2025 14:30:14",
      "content": "<p>At the end of this long notebook I wrote a few utility functions to verify a submission file: <a href=\"https://www.kaggle.com/code/dalloliogm/eda-exploring-cell-type-abundance#A-function-to-verify-whether-a-submission-file-is-plausible,-based-on-neighbour-ranks\" target=\"_blank\">https://www.kaggle.com/code/dalloliogm/eda-exploring-cell-type-abundance#A-function-to-verify-whether-a-submission-file-is-plausible,-based-on-neighbour-ranks</a></p>\n<p>The function <code>score_submission_with_global_consistency</code> verifies that:</p>\n<ul>\n<li>the relative ranks of the cell types are compatible with the other slides. For example, cell type 30 is often the most abundant cell type in the slide; while 1, 5, and others are often rare</li>\n<li>the relative rank of each cell type is compatible with its neighbour spots. This is based on the assumption that cells of the same type should be close to each other. It may be correct for some cell types, and wrong for others.</li>\n</ul>\n<p>The function also plots the submission file. I think that for this challenge, plotting is very useful.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F650%2Fb223434ab8b71d161edd652e604a6978%2F__results___40_1.png?generation=1743172227048497&amp;alt=media\" alt=\"\"></p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 3177451,
      "author_name": "ayberkmir",
      "author_url": "",
      "post_date": "04/12/2025 19:07:36",
      "content": "<p>Now that it's been extended for another month, it would be informative especially for those joining late.<br>\nMy best single model's OOF Spearman score is 0.6792 (using every slide as validation). <br>\nLB 0.6175</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "3158213": "My metric is spearman_corr metric\n\n```code\ndef spearman_rank_correlation(x, y):\n    return spearmanr(x, y).correlation\n    \ndef spearman_corr(preds, target):\n    N = len(preds)\n    correlations = [spearman_rank_correlation(preds[i], target[i]) for i in tqdm(range(N))]\n    return np.mean(correlations)\n```\nToday CV score is 0.438 (LB is 0.64730) (Group K Fold, k = 5)\n\nMy best CV score is 0.44. (LB score is 56878) (Group K Fold, k = 5)\n\nPast: CV 0.19842 - LB 0.28582",
    "3159974": "Using the spearman correlation is clever, because the competition score is calculated that way. In theory, instead of predicting the actual abundance scores, we could just predict their ranks - which cells have lower abundancy, and which ones have higher.",
    "3161871": "At the end of this long notebook I wrote a few utility functions to verify a submission file: https://www.kaggle.com/code/dalloliogm/eda-exploring-cell-type-abundance#A-function-to-verify-whether-a-submission-file-is-plausible,-based-on-neighbour-ranks\n\nThe function `score_submission_with_global_consistency` verifies that:\n- the relative ranks of the cell types are compatible with the other slides. For example, cell type 30 is often the most abundant cell type in the slide; while 1, 5, and others are often rare\n- the relative rank of each cell type is compatible with its neighbour spots. This is based on the assumption that cells of the same type should be close to each other. It may be correct for some cell types, and wrong for others.\n\nThe function also plots the submission file. I think that for this challenge, plotting is very useful.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F650%2Fb223434ab8b71d161edd652e604a6978%2F__results___40_1.png?generation=1743172227048497&alt=media)",
    "3177451": "Now that it's been extended for another month, it would be informative especially for those joining late.\nMy best single model's OOF Spearman score is 0.6792 (using every slide as validation). \nLB 0.6175"
  },
  "source": "meta"
}