{
  "id": 208426,
  "title": "Should I embrace some target leakage in my validation?",
  "url": "/competitions/riiid-test-answer-prediction/discussion/208426",
  "author_name": "",
  "post_date": "2021-01-03T12:23:28.522278200Z",
  "votes": 1,
  "comment_count": 6,
  "views": 0,
  "content": "<p>As it has been said already, at inference time we don't have the target values for the current task container for each user.    <br>\nSo far, I neglected this detail and in my feature engineering I update the target after each question. My CV is higher than my LB, but there is very good correlation.</p>\n<p>Inspired by what <a href=\"https://www.kaggle.com/mamasinkgs\" target=\"_blank\">@mamasinkgs</a> wrote in another post, I decided to remove this leakage and make sure I update the target after each task_container_id, rather than after each question_id. My CV is now spot on wrt LB, but LB is lower.</p>\n<p>Do people have similar experience with that? </p>",
  "messages": [
    {
      "id": "1136779",
      "postDate": "01/03/2021 12:23:28",
      "content": "<p>As it has been said already, at inference time we don't have the target values for the current task container for each user.    <br>\nSo far, I neglected this detail and in my feature engineering I update the target after each question. My CV is higher than my LB, but there is very good correlation.</p>\n<p>Inspired by what <a href=\"https://www.kaggle.com/mamasinkgs\" target=\"_blank\">@mamasinkgs</a> wrote in another post, I decided to remove this leakage and make sure I update the target after each task_container_id, rather than after each question_id. My CV is now spot on wrt LB, but LB is lower.</p>\n<p>Do people have similar experience with that? </p>",
      "rawMarkdown": "As it has been said already, at inference time we don't have the target values for the current task container for each user.    \nSo far, I neglected this detail and in my feature engineering I update the target after each question. My CV is higher than my LB, but there is very good correlation.\n\nInspired by what @mamasinkgs wrote in another post, I decided to remove this leakage and make sure I update the target after each task_container_id, rather than after each question_id. My CV is now spot on wrt LB, but LB is lower.\n\nDo people have similar experience with that?",
      "votes": null
    },
    {
      "id": "1136811",
      "postDate": "01/03/2021 13:02:05",
      "content": "<p>I experienced quite the opposite, it gave me a small bump in my LB score.</p>",
      "rawMarkdown": "I experienced quite the opposite, it gave me a small bump in my LB score.",
      "votes": null
    },
    {
      "id": "1136814",
      "postDate": "01/03/2021 13:03:42",
      "content": "<p>cool, thx. I must be doing something wrong with the implementation.</p>",
      "rawMarkdown": "cool, thx. I must be doing something wrong with the implementation.",
      "votes": null
    },
    {
      "id": "1136866",
      "postDate": "01/03/2021 13:55:18",
      "content": "<p>During the time I attempted to make this change to my training pipeline, I ended up discovering a myriad of issues with my data preparation. The result of which after they were all patched was my cv was considerably less. But due to aforementioned issues, I can't definitively attribute it to the leakage or the other problems that were corrected.</p>",
      "rawMarkdown": "During the time I attempted to make this change to my training pipeline, I ended up discovering a myriad of issues with my data preparation. The result of which after they were all patched was my cv was considerably less. But due to aforementioned issues, I can't definitively attribute it to the leakage or the other problems that were corrected.",
      "votes": null
    },
    {
      "id": "1136872",
      "postDate": "01/03/2021 13:59:58",
      "content": "<p>What about your LB?<br>\nI expect my CV to go down \"by construction\" after fixing this leakage, but I was expecting my LB to go up instead…</p>",
      "rawMarkdown": "What about your LB?\nI expect my CV to go down \"by construction\" after fixing this leakage, but I was expecting my LB to go up instead...",
      "votes": null
    },
    {
      "id": "1136941",
      "postDate": "01/03/2021 14:54:26",
      "content": "<p>I haven't made a LB submission with any of my own models.</p>",
      "rawMarkdown": "I haven't made a LB submission with any of my own models.",
      "votes": null
    },
    {
      "id": "1140426",
      "postDate": "01/06/2021 02:18:05",
      "content": "<p>Never!!!<br>\nIt is dangerous. The shake game is not fun at all.🤥🤥🤥</p>",
      "rawMarkdown": "Never!!!\nIt is dangerous. The shake game is not fun at all.🤥🤥🤥",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1136811,
      "author_name": "abdessalemboukil",
      "author_url": "",
      "post_date": "01/03/2021 13:02:05",
      "content": "<p>I experienced quite the opposite, it gave me a small bump in my LB score.</p>",
      "votes": null,
      "replies": [
        {
          "id": 1136814,
          "author_name": "stecasasso",
          "author_url": "",
          "post_date": "01/03/2021 13:03:42",
          "content": "<p>cool, thx. I must be doing something wrong with the implementation.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1136866,
      "author_name": "authman",
      "author_url": "",
      "post_date": "01/03/2021 13:55:18",
      "content": "<p>During the time I attempted to make this change to my training pipeline, I ended up discovering a myriad of issues with my data preparation. The result of which after they were all patched was my cv was considerably less. But due to aforementioned issues, I can't definitively attribute it to the leakage or the other problems that were corrected.</p>",
      "votes": null,
      "replies": [
        {
          "id": 1136872,
          "author_name": "stecasasso",
          "author_url": "",
          "post_date": "01/03/2021 13:59:58",
          "content": "<p>What about your LB?<br>\nI expect my CV to go down \"by construction\" after fixing this leakage, but I was expecting my LB to go up instead…</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1136941,
          "author_name": "authman",
          "author_url": "",
          "post_date": "01/03/2021 14:54:26",
          "content": "<p>I haven't made a LB submission with any of my own models.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1140426,
      "author_name": "xiaowangiiiii",
      "author_url": "",
      "post_date": "01/06/2021 02:18:05",
      "content": "<p>Never!!!<br>\nIt is dangerous. The shake game is not fun at all.🤥🤥🤥</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1136779": "As it has been said already, at inference time we don't have the target values for the current task container for each user.    \nSo far, I neglected this detail and in my feature engineering I update the target after each question. My CV is higher than my LB, but there is very good correlation.\n\nInspired by what @mamasinkgs wrote in another post, I decided to remove this leakage and make sure I update the target after each task_container_id, rather than after each question_id. My CV is now spot on wrt LB, but LB is lower.\n\nDo people have similar experience with that?",
    "1136811": "I experienced quite the opposite, it gave me a small bump in my LB score.",
    "1136814": "cool, thx. I must be doing something wrong with the implementation.",
    "1136866": "During the time I attempted to make this change to my training pipeline, I ended up discovering a myriad of issues with my data preparation. The result of which after they were all patched was my cv was considerably less. But due to aforementioned issues, I can't definitively attribute it to the leakage or the other problems that were corrected.",
    "1136872": "What about your LB?\nI expect my CV to go down \"by construction\" after fixing this leakage, but I was expecting my LB to go up instead...",
    "1136941": "I haven't made a LB submission with any of my own models.",
    "1140426": "Never!!!\nIt is dangerous. The shake game is not fun at all.🤥🤥🤥"
  },
  "source": "meta"
}