{
  "id": 588802,
  "title": "You can't use past lag features also (after sorting test data)",
  "url": "/competitions/drw-crypto-market-prediction/discussion/588802",
  "author_name": "Hemant Kumar",
  "post_date": "2025-07-08T10:49:14.836000",
  "votes": 0,
  "comment_count": 2,
  "views": 0,
  "content": "<p>As given in the overview tab</p>\n<blockquote>\n  <ol>\n  <li><p>You are NOT allowed to use the test dataset to aid the modeling process, as all test data—<strong>except for the current test data point to predict</strong>—contains future information that would not be available at prediction time in a real-world setting.</p></li>\n  <li><p>Similar to the note about using future data, any external dataset containing future information will be considered a rule violation. So make sure everything you use would have been available at the time of test data prediction!</p></li>\n  </ol>\n</blockquote>\n<p>And while the random shuffling almost certainly seems to be done with randoms state 700, it isn't 100% confirmed from their side so any other row might include future data.</p>",
  "messages": [
    {
      "id": 3244667,
      "postDate": "2025-07-08T11:29:35.530Z",
      "content": "<p>Great work, and thanks for sharing!</p>\n<p>Just to confirm — does your current public score use lead features like:</p>\n<pre><code>df[] = df[col].shift(-lag)\n</code></pre>\n<p>If so, wouldn’t that introduce future information into the test set, especially if it was sorted?<br>\nJust trying to understand whether any data leakage might be involved.</p>",
      "rawMarkdown": "Great work, and thanks for sharing!\n\nJust to confirm — does your current public score use lead features like:\n\n```python\ndf[f'{col}_lead_{lag}'] = df[col].shift(-lag)\n```\n\nIf so, wouldn’t that introduce future information into the test set, especially if it was sorted?\nJust trying to understand whether any data leakage might be involved."
    },
    {
      "id": 3244641,
      "postDate": "2025-07-08T10:49:14.837Z",
      "content": "<p>As given in the overview tab</p>\n<blockquote>\n  <ol>\n  <li><p>You are NOT allowed to use the test dataset to aid the modeling process, as all test data—<strong>except for the current test data point to predict</strong>—contains future information that would not be available at prediction time in a real-world setting.</p></li>\n  <li><p>Similar to the note about using future data, any external dataset containing future information will be considered a rule violation. So make sure everything you use would have been available at the time of test data prediction!</p></li>\n  </ol>\n</blockquote>\n<p>And while the random shuffling almost certainly seems to be done with randoms state 700, it isn't 100% confirmed from their side so any other row might include future data.</p>",
      "rawMarkdown": "As given in the overview tab\n> 1. You are NOT allowed to use the test dataset to aid the modeling process, as all test data—**except for the current test data point to predict**—contains future information that would not be available at prediction time in a real-world setting.\n\n> 2. Similar to the note about using future data, any external dataset containing future information will be considered a rule violation. So make sure everything you use would have been available at the time of test data prediction!\n\nAnd while the random shuffling almost certainly seems to be done with randoms state 700, it isn't 100% confirmed from their side so any other row might include future data."
    },
    {
      "id": 3244665,
      "postDate": "2025-07-08T11:28:04.867Z",
      "rawMarkdown": "",
      "isDeleted": true
    }
  ],
  "comments": [
    {
      "id": 3244667,
      "author_name": "MLFINANCE",
      "author_url": "",
      "post_date": "2025-07-08T11:29:35.530000",
      "content": "<p>Great work, and thanks for sharing!</p>\n<p>Just to confirm — does your current public score use lead features like:</p>\n<pre><code>df[] = df[col].shift(-lag)\n</code></pre>\n<p>If so, wouldn’t that introduce future information into the test set, especially if it was sorted?<br>\nJust trying to understand whether any data leakage might be involved.</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 3244665,
      "author_name": "",
      "author_url": "",
      "post_date": "2025-07-08T11:28:04.867000",
      "content": "",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "3244667": "Great work, and thanks for sharing!\n\nJust to confirm — does your current public score use lead features like:\n\n```python\ndf[f'{col}_lead_{lag}'] = df[col].shift(-lag)\n```\n\nIf so, wouldn’t that introduce future information into the test set, especially if it was sorted?\nJust trying to understand whether any data leakage might be involved.",
    "3244641": "As given in the overview tab\n> 1. You are NOT allowed to use the test dataset to aid the modeling process, as all test data—**except for the current test data point to predict**—contains future information that would not be available at prediction time in a real-world setting.\n\n> 2. Similar to the note about using future data, any external dataset containing future information will be considered a rule violation. So make sure everything you use would have been available at the time of test data prediction!\n\nAnd while the random shuffling almost certainly seems to be done with randoms state 700, it isn't 100% confirmed from their side so any other row might include future data.",
    "3244665": ""
  }
}