{
  "id": 314462,
  "title": "How to cross-validate properly? Should I take date into account?",
  "url": "/competitions/h-and-m-personalized-fashion-recommendations/discussion/314462",
  "author_name": "",
  "post_date": "2022-03-22T18:27:37.284826600Z",
  "votes": 2,
  "comment_count": 2,
  "views": 0,
  "content": "<p>Hello fellows.</p>\n<p>Since there is a date variable in the transactions table, should I consider that whenever splitting my data into train-validation-test? Which is the proper way to split samples?</p>\n<p>My guts tell me that the chronological order must be preserved but I am not sure how to proceed then. Is <a href=\"https://medium.com/@samuel.monnier/cross-validation-tools-for-time-series-ffa1a5a09bf9\" target=\"_blank\">combinatorial cross-validation</a> the proper way to do it here, what do you fellows think?</p>\n<p>Moreover, I shouldn't use the validation split I used to fine-tune my models to build a stacker later, right? Should I use the test splits instead or there is a better way to do it?</p>\n<p>I intend to do the following:</p>\n<ol>\n<li>Build several models and fine-tune each of them (validation sample is needed here)</li>\n<li>Try several stackers on top of previously trained and tuned models (more validation needed)</li>\n<li>Estimate chosen stacker performance (test data needed)</li>\n</ol>\n<p>Hope to repeat steps 1 to 3 until the competition's final deadline. During step 1 I also look forward to combining and creating new features.</p>\n<p>It bugs my mind whenever there is stacking to do after hyperparameter optimization. I'm always asking myself what is the proper way to do it. If you guys and girls could point me out some studying material such as videos, articles, courses, and books it will be of great help.</p>\n<p>Any piece of advice?</p>",
  "messages": [
    {
      "id": "1731839",
      "postDate": "03/22/2022 18:27:37",
      "content": "<p>Hello fellows.</p>\n<p>Since there is a date variable in the transactions table, should I consider that whenever splitting my data into train-validation-test? Which is the proper way to split samples?</p>\n<p>My guts tell me that the chronological order must be preserved but I am not sure how to proceed then. Is <a href=\"https://medium.com/@samuel.monnier/cross-validation-tools-for-time-series-ffa1a5a09bf9\" target=\"_blank\">combinatorial cross-validation</a> the proper way to do it here, what do you fellows think?</p>\n<p>Moreover, I shouldn't use the validation split I used to fine-tune my models to build a stacker later, right? Should I use the test splits instead or there is a better way to do it?</p>\n<p>I intend to do the following:</p>\n<ol>\n<li>Build several models and fine-tune each of them (validation sample is needed here)</li>\n<li>Try several stackers on top of previously trained and tuned models (more validation needed)</li>\n<li>Estimate chosen stacker performance (test data needed)</li>\n</ol>\n<p>Hope to repeat steps 1 to 3 until the competition's final deadline. During step 1 I also look forward to combining and creating new features.</p>\n<p>It bugs my mind whenever there is stacking to do after hyperparameter optimization. I'm always asking myself what is the proper way to do it. If you guys and girls could point me out some studying material such as videos, articles, courses, and books it will be of great help.</p>\n<p>Any piece of advice?</p>",
      "rawMarkdown": "Hello fellows.\n\nSince there is a date variable in the transactions table, should I consider that whenever splitting my data into train-validation-test? Which is the proper way to split samples?\n\nMy guts tell me that the chronological order must be preserved but I am not sure how to proceed then. Is [combinatorial cross-validation](https://medium.com/@samuel.monnier/cross-validation-tools-for-time-series-ffa1a5a09bf9) the proper way to do it here, what do you fellows think?\n\nMoreover, I shouldn't use the validation split I used to fine-tune my models to build a stacker later, right? Should I use the test splits instead or there is a better way to do it?\n\nI intend to do the following:\n1. Build several models and fine-tune each of them (validation sample is needed here)\n2. Try several stackers on top of previously trained and tuned models (more validation needed)\n3. Estimate chosen stacker performance (test data needed)\n\nHope to repeat steps 1 to 3 until the competition's final deadline. During step 1 I also look forward to combining and creating new features.\n\nIt bugs my mind whenever there is stacking to do after hyperparameter optimization. I'm always asking myself what is the proper way to do it. If you guys and girls could point me out some studying material such as videos, articles, courses, and books it will be of great help.\n\nAny piece of advice?",
      "votes": null
    },
    {
      "id": "1732109",
      "postDate": "03/23/2022 02:43:06",
      "content": "<p>Have a look at this thread:<br>\n<a href=\"https://www.kaggle.com/competitions/h-and-m-personalized-fashion-recommendations/discussion/308919\" target=\"_blank\">https://www.kaggle.com/competitions/h-and-m-personalized-fashion-recommendations/discussion/308919</a></p>",
      "rawMarkdown": "Have a look at this thread:\nhttps://www.kaggle.com/competitions/h-and-m-personalized-fashion-recommendations/discussion/308919",
      "votes": null
    },
    {
      "id": "1732441",
      "postDate": "03/23/2022 11:51:47",
      "content": "<p>Very helpful. Many thanks.</p>",
      "rawMarkdown": "Very helpful. Many thanks.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1732109,
      "author_name": "jacob34",
      "author_url": "",
      "post_date": "03/23/2022 02:43:06",
      "content": "<p>Have a look at this thread:<br>\n<a href=\"https://www.kaggle.com/competitions/h-and-m-personalized-fashion-recommendations/discussion/308919\" target=\"_blank\">https://www.kaggle.com/competitions/h-and-m-personalized-fashion-recommendations/discussion/308919</a></p>",
      "votes": null,
      "replies": [
        {
          "id": 1732441,
          "author_name": "vitorbl",
          "author_url": "",
          "post_date": "03/23/2022 11:51:47",
          "content": "<p>Very helpful. Many thanks.</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1731839": "Hello fellows.\n\nSince there is a date variable in the transactions table, should I consider that whenever splitting my data into train-validation-test? Which is the proper way to split samples?\n\nMy guts tell me that the chronological order must be preserved but I am not sure how to proceed then. Is [combinatorial cross-validation](https://medium.com/@samuel.monnier/cross-validation-tools-for-time-series-ffa1a5a09bf9) the proper way to do it here, what do you fellows think?\n\nMoreover, I shouldn't use the validation split I used to fine-tune my models to build a stacker later, right? Should I use the test splits instead or there is a better way to do it?\n\nI intend to do the following:\n1. Build several models and fine-tune each of them (validation sample is needed here)\n2. Try several stackers on top of previously trained and tuned models (more validation needed)\n3. Estimate chosen stacker performance (test data needed)\n\nHope to repeat steps 1 to 3 until the competition's final deadline. During step 1 I also look forward to combining and creating new features.\n\nIt bugs my mind whenever there is stacking to do after hyperparameter optimization. I'm always asking myself what is the proper way to do it. If you guys and girls could point me out some studying material such as videos, articles, courses, and books it will be of great help.\n\nAny piece of advice?",
    "1732109": "Have a look at this thread:\nhttps://www.kaggle.com/competitions/h-and-m-personalized-fashion-recommendations/discussion/308919",
    "1732441": "Very helpful. Many thanks."
  },
  "source": "meta"
}