{
  "id": 307051,
  "title": "Local MAP@5 vs. Public LB",
  "url": "/competitions/happy-whale-and-dolphin/discussion/307051",
  "author_name": "",
  "post_date": "2022-02-12T09:50:20.858194400Z",
  "votes": 10,
  "comment_count": 9,
  "views": 0,
  "content": "<p>Hi guys, I'm just trying to get things setup so that my public LB performance tracks my local performance, but having some issues. For example, in some experiments I'm reporting local MAP@5 scores of around 0.50 on my validation set but finding it's much lower on public LB - around 0.25.</p>\n<p>Is anyone else experiencing the same result? If not, I suspect my local validation checks have a bug in there somewhere. Thanks and good luck to everyone.</p>",
  "messages": [
    {
      "id": "1686707",
      "postDate": "02/12/2022 09:50:20",
      "content": "<p>Hi guys, I'm just trying to get things setup so that my public LB performance tracks my local performance, but having some issues. For example, in some experiments I'm reporting local MAP@5 scores of around 0.50 on my validation set but finding it's much lower on public LB - around 0.25.</p>\n<p>Is anyone else experiencing the same result? If not, I suspect my local validation checks have a bug in there somewhere. Thanks and good luck to everyone.</p>",
      "rawMarkdown": "Hi guys, I'm just trying to get things setup so that my public LB performance tracks my local performance, but having some issues. For example, in some experiments I'm reporting local MAP@5 scores of around 0.50 on my validation set but finding it's much lower on public LB - around 0.25.\n\nIs anyone else experiencing the same result? If not, I suspect my local validation checks have a bug in there somewhere. Thanks and good luck to everyone.",
      "votes": null
    },
    {
      "id": "1686848",
      "postDate": "02/12/2022 11:40:09",
      "content": "<p>Do you take \"new_individuals\" on public LB into account?<br>\nI feel like its a bit challenging to incorporate these properly into a validation metric.</p>\n<p>If you do not predict new_individuals, then LB should be around 0.112 lower by default. </p>",
      "rawMarkdown": "Do you take \"new_individuals\" on public LB into account?\nI feel like its a bit challenging to incorporate these properly into a validation metric.\n\nIf you do not predict new_individuals, then LB should be around 0.112 lower by default.",
      "votes": null
    },
    {
      "id": "1686897",
      "postDate": "02/12/2022 12:30:37",
      "content": "<p>So I also saw that in LB the proportion of new_individuals is 0.112, so I designed my local validation set to have the same proportion roughly. By this I mean I ensured 11.2% of the validation examples were an id that did not exist in my training data, and the other examples were selected randomly.</p>\n<p>I still get the same result, that there is a dramatic difference between local MAP@5 and LB. Perhaps I am not calculating the metric correctly.</p>",
      "rawMarkdown": "So I also saw that in LB the proportion of new_individuals is 0.112, so I designed my local validation set to have the same proportion roughly. By this I mean I ensured 11.2% of the validation examples were an id that did not exist in my training data, and the other examples were selected randomly.\n\nI still get the same result, that there is a dramatic difference between local MAP@5 and LB. Perhaps I am not calculating the metric correctly.",
      "votes": null
    },
    {
      "id": "1686941",
      "postDate": "02/12/2022 13:04:35",
      "content": "<p>Then this does not seem to be the problem.<br>\nKeep in mind that the new_individuals class is not randomly distributed on test set.</p>\n<p>So I just did submissions without new_individual class to evaluate my metric, while also not considering new_individuals in my validation metric.</p>\n<p>I initially also had the false implementation in the beginning. <br>\nI did Precision@5 instead of MAP@5. Maybe you are doing something similar? I easily got confused there.</p>\n<p>Good luck!</p>",
      "rawMarkdown": "Then this does not seem to be the problem.\nKeep in mind that the new_individuals class is not randomly distributed on test set.\n\nSo I just did submissions without new_individual class to evaluate my metric, while also not considering new_individuals in my validation metric.\n\nI initially also had the false implementation in the beginning. \nI did Precision@5 instead of MAP@5. Maybe you are doing something similar? I easily got confused there.\n\nGood luck!",
      "votes": null
    },
    {
      "id": "1687007",
      "postDate": "02/12/2022 14:29:18",
      "content": "<p>Thanks for your suggestions, and good luck to you too :)</p>",
      "rawMarkdown": "Thanks for your suggestions, and good luck to you too :)",
      "votes": null
    },
    {
      "id": "1687086",
      "postDate": "02/12/2022 16:03:41",
      "content": "<p><a href=\"https://www.kaggle.com/jpbremer\" target=\"_blank\">@jpbremer</a> care to say your cv score?</p>",
      "rawMarkdown": "jpbremer care to say your cv score?",
      "votes": null
    },
    {
      "id": "1687098",
      "postDate": "02/12/2022 16:08:23",
      "content": "<p>CV 0.8, LB 0.63</p>\n<p>Dont habe CV for 0.72, as its a bit more complicated.</p>",
      "rawMarkdown": "CV 0.8, LB 0.63\n\nDont habe CV for 0.72, as its a bit more complicated.",
      "votes": null
    },
    {
      "id": "1687112",
      "postDate": "02/12/2022 16:14:55",
      "content": "<p>How are you splitting your data into folds?</p>",
      "rawMarkdown": "How are you splitting your data into folds?",
      "votes": null
    },
    {
      "id": "1687178",
      "postDate": "02/12/2022 16:51:46",
      "content": "<p>wow, there's good gap between them.<br>\nHow are you splitting the data? I am just using startifiedKfold on individual id,  not correlating with LB at all</p>",
      "rawMarkdown": "wow, there's good gap between them.\nHow are you splitting the data? I am just using startifiedKfold on individual id,  not correlating with LB at all",
      "votes": null
    },
    {
      "id": "1687526",
      "postDate": "02/12/2022 22:50:19",
      "content": "<p>Quick question, Do you train KNN or something similar every epoch and check CV using MAP@5 ? Just wondering. </p>",
      "rawMarkdown": "Quick question, Do you train KNN or something similar every epoch and check CV using MAP@5 ? Just wondering.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1686848,
      "author_name": "jpbremer",
      "author_url": "",
      "post_date": "02/12/2022 11:40:09",
      "content": "<p>Do you take \"new_individuals\" on public LB into account?<br>\nI feel like its a bit challenging to incorporate these properly into a validation metric.</p>\n<p>If you do not predict new_individuals, then LB should be around 0.112 lower by default. </p>",
      "votes": null,
      "replies": [
        {
          "id": 1686897,
          "author_name": "taindow",
          "author_url": "",
          "post_date": "02/12/2022 12:30:37",
          "content": "<p>So I also saw that in LB the proportion of new_individuals is 0.112, so I designed my local validation set to have the same proportion roughly. By this I mean I ensured 11.2% of the validation examples were an id that did not exist in my training data, and the other examples were selected randomly.</p>\n<p>I still get the same result, that there is a dramatic difference between local MAP@5 and LB. Perhaps I am not calculating the metric correctly.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1686941,
          "author_name": "jpbremer",
          "author_url": "",
          "post_date": "02/12/2022 13:04:35",
          "content": "<p>Then this does not seem to be the problem.<br>\nKeep in mind that the new_individuals class is not randomly distributed on test set.</p>\n<p>So I just did submissions without new_individual class to evaluate my metric, while also not considering new_individuals in my validation metric.</p>\n<p>I initially also had the false implementation in the beginning. <br>\nI did Precision@5 instead of MAP@5. Maybe you are doing something similar? I easily got confused there.</p>\n<p>Good luck!</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1687007,
          "author_name": "taindow",
          "author_url": "",
          "post_date": "02/12/2022 14:29:18",
          "content": "<p>Thanks for your suggestions, and good luck to you too :)</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1687086,
          "author_name": "mrinath",
          "author_url": "",
          "post_date": "02/12/2022 16:03:41",
          "content": "<p><a href=\"https://www.kaggle.com/jpbremer\" target=\"_blank\">@jpbremer</a> care to say your cv score?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1687098,
          "author_name": "jpbremer",
          "author_url": "",
          "post_date": "02/12/2022 16:08:23",
          "content": "<p>CV 0.8, LB 0.63</p>\n<p>Dont habe CV for 0.72, as its a bit more complicated.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1687178,
          "author_name": "mrinath",
          "author_url": "",
          "post_date": "02/12/2022 16:51:46",
          "content": "<p>wow, there's good gap between them.<br>\nHow are you splitting the data? I am just using startifiedKfold on individual id,  not correlating with LB at all</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1687112,
      "author_name": "mrinath",
      "author_url": "",
      "post_date": "02/12/2022 16:14:55",
      "content": "<p>How are you splitting your data into folds?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1687526,
      "author_name": "atharvap329",
      "author_url": "",
      "post_date": "02/12/2022 22:50:19",
      "content": "<p>Quick question, Do you train KNN or something similar every epoch and check CV using MAP@5 ? Just wondering. </p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1686707": "Hi guys, I'm just trying to get things setup so that my public LB performance tracks my local performance, but having some issues. For example, in some experiments I'm reporting local MAP@5 scores of around 0.50 on my validation set but finding it's much lower on public LB - around 0.25.\n\nIs anyone else experiencing the same result? If not, I suspect my local validation checks have a bug in there somewhere. Thanks and good luck to everyone.",
    "1686848": "Do you take \"new_individuals\" on public LB into account?\nI feel like its a bit challenging to incorporate these properly into a validation metric.\n\nIf you do not predict new_individuals, then LB should be around 0.112 lower by default.",
    "1686897": "So I also saw that in LB the proportion of new_individuals is 0.112, so I designed my local validation set to have the same proportion roughly. By this I mean I ensured 11.2% of the validation examples were an id that did not exist in my training data, and the other examples were selected randomly.\n\nI still get the same result, that there is a dramatic difference between local MAP@5 and LB. Perhaps I am not calculating the metric correctly.",
    "1686941": "Then this does not seem to be the problem.\nKeep in mind that the new_individuals class is not randomly distributed on test set.\n\nSo I just did submissions without new_individual class to evaluate my metric, while also not considering new_individuals in my validation metric.\n\nI initially also had the false implementation in the beginning. \nI did Precision@5 instead of MAP@5. Maybe you are doing something similar? I easily got confused there.\n\nGood luck!",
    "1687007": "Thanks for your suggestions, and good luck to you too :)",
    "1687086": "jpbremer care to say your cv score?",
    "1687098": "CV 0.8, LB 0.63\n\nDont habe CV for 0.72, as its a bit more complicated.",
    "1687112": "How are you splitting your data into folds?",
    "1687178": "wow, there's good gap between them.\nHow are you splitting the data? I am just using startifiedKfold on individual id,  not correlating with LB at all",
    "1687526": "Quick question, Do you train KNN or something similar every epoch and check CV using MAP@5 ? Just wondering."
  },
  "source": "meta"
}