{
  "id": 364176,
  "title": "Are there identical users in Train and Test data?",
  "url": "/competitions/otto-recommender-system/discussion/364176",
  "author_name": "",
  "post_date": "2022-11-05T04:58:57.915058200Z",
  "votes": 16,
  "comment_count": 6,
  "views": 0,
  "content": "<p>From some discussions and GitHub descriptions, we understand that a session represents a unique user's history of events.　</p>\n<p>And I have confirmed that there are no duplicate sessions in Train and Test.</p>\n<p>However, looking at the graph below, it appears that Train and Test have identical users. (This graph can be found in the GitHub README. <a href=\"https://github.com/otto-de/recsys-dataset\" target=\"_blank\">https://github.com/otto-de/recsys-dataset</a>)<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3845682%2Fe097e33b07eee129c8323cf4d1478257%2F2022-11-05%2013.46.14.png?generation=1667624094815429&amp;alt=media\" alt=\"\"></p>\n<p>Do Train and Test include the same user? Or am I misinterpreting the figure?<br>\nClarifying this is important in creating validation.</p>",
  "messages": [
    {
      "id": "2017682",
      "postDate": "11/05/2022 04:58:57",
      "content": "<p>From some discussions and GitHub descriptions, we understand that a session represents a unique user's history of events.　</p>\n<p>And I have confirmed that there are no duplicate sessions in Train and Test.</p>\n<p>However, looking at the graph below, it appears that Train and Test have identical users. (This graph can be found in the GitHub README. <a href=\"https://github.com/otto-de/recsys-dataset\" target=\"_blank\">https://github.com/otto-de/recsys-dataset</a>)<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3845682%2Fe097e33b07eee129c8323cf4d1478257%2F2022-11-05%2013.46.14.png?generation=1667624094815429&amp;alt=media\" alt=\"\"></p>\n<p>Do Train and Test include the same user? Or am I misinterpreting the figure?<br>\nClarifying this is important in creating validation.</p>",
      "rawMarkdown": "From some discussions and GitHub descriptions, we understand that a session represents a unique user's history of events.　\n\nAnd I have confirmed that there are no duplicate sessions in Train and Test.\n\nHowever, looking at the graph below, it appears that Train and Test have identical users. (This graph can be found in the GitHub README. https://github.com/otto-de/recsys-dataset)\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3845682%2Fe097e33b07eee129c8323cf4d1478257%2F2022-11-05%2013.46.14.png?generation=1667624094815429&alt=media)\n\n\nDo Train and Test include the same user? Or am I misinterpreting the figure?\nClarifying this is important in creating validation.",
      "votes": null
    },
    {
      "id": "2017786",
      "postDate": "11/05/2022 06:40:08",
      "content": "<p>I believe users in test set are users not seen before (at least according to the tracking mechanism that is used). Or rather, not seen since the beginning of the train set.</p>\n<p>A session doesn't have an end date. If a user would perform an activity during the test week, it would just be rolled up to the session that started in train if they were seen before. Essentially, this would be the part that is getting trimmed.</p>\n<p>So all the sessions in test are \"self-contained\" in this sense. They start in the test week (meaning they are by users not see  in train) and last at most 1 week.</p>",
      "rawMarkdown": "I believe users in test set are users not seen before (at least according to the tracking mechanism that is used). Or rather, not seen since the beginning of the train set.\n\nA session doesn't have an end date. If a user would perform an activity during the test week, it would just be rolled up to the session that started in train if they were seen before. Essentially, this would be the part that is getting trimmed.\n\nSo all the sessions in test are \"self-contained\" in this sense. They start in the test week (meaning they are by users not see  in train) and last at most 1 week.",
      "votes": null
    },
    {
      "id": "2017824",
      "postDate": "11/05/2022 07:02:02",
      "content": "<p>I think not. As shown in the picture above the overlapping sessions have been discarded, so you won't see any identical sessions.</p>",
      "rawMarkdown": "I think not. As shown in the picture above the overlapping sessions have been discarded, so you won't see any identical sessions.",
      "votes": null
    },
    {
      "id": "2018291",
      "postDate": "11/05/2022 15:24:14",
      "content": "<p>I understand your point of view.</p>\n<p>However, if there is no end of the session, why are sessions such as in rows 3 and 7 of the above graph interrupted in the middle of the Train period?<br>\nAlso, the users whose histories are discarded for the test period are represented in one row.</p>\n<p>Shouldn't this graph represent sessions that the Train and Test periods overlap as in rows 2, 4, and 6 of the graph, and new sessions appear in the Test period should be shown in a separate row?</p>\n<p>I feel there is no duplication of users from other discussion comments. However, I think this graph is weird about this graph.<br>\nAm I overthinking this?</p>",
      "rawMarkdown": "I understand your point of view.\n\nHowever, if there is no end of the session, why are sessions such as in rows 3 and 7 of the above graph interrupted in the middle of the Train period?\nAlso, the users whose histories are discarded for the test period are represented in one row.\n\nShouldn't this graph represent sessions that the Train and Test periods overlap as in rows 2, 4, and 6 of the graph, and new sessions appear in the Test period should be shown in a separate row?\n\nI feel there is no duplication of users from other discussion comments. However, I think this graph is weird about this graph.\nAm I overthinking this?",
      "votes": null
    },
    {
      "id": "2018687",
      "postDate": "11/05/2022 22:31:20",
      "content": "<p>Hey <a href=\"https://www.kaggle.com/ryotak12\" target=\"_blank\">@ryotak12</a>!</p>\n<p>Not sure if this can be helpful, but here is my reasoning 🙂</p>\n<p>If I understand it correctly, the reason some sessions end in train and don't stretch into the test period, is that they represent genuine user activity. In a sense, there is no end to those sessions, but simply some users who took actions in train have not come onto the platform in test time, have not taken any actions during test.</p>\n<p>For instance, I don't think that the first line represents the same user in train and test. The sessions are just on a single line, but they come from different users (at least that would make sense based on other information shared by the organizer, but this is just my interpretation, I have not seen this specific observation confirmed anywhere directly)</p>",
      "rawMarkdown": "Hey @ryotak12!\n\nNot sure if this can be helpful, but here is my reasoning 🙂\n\nIf I understand it correctly, the reason some sessions end in train and don't stretch into the test period, is that they represent genuine user activity. In a sense, there is no end to those sessions, but simply some users who took actions in train have not come onto the platform in test time, have not taken any actions during test.\n\nFor instance, I don't think that the first line represents the same user in train and test. The sessions are just on a single line, but they come from different users (at least that would make sense based on other information shared by the organizer, but this is just my interpretation, I have not seen this specific observation confirmed anywhere directly)",
      "votes": null
    },
    {
      "id": "2019221",
      "postDate": "11/06/2022 12:35:06",
      "content": "<p>Thanks for your question, <a href=\"https://www.kaggle.com/ryotak12\" target=\"_blank\">@ryotak12</a>! Train and Test users are completely disjunct. The rows in the figure have no intended meaning :)</p>",
      "rawMarkdown": "Thanks for your question, @ryotak12! Train and Test users are completely disjunct. The rows in the figure have no intended meaning :)",
      "votes": null
    },
    {
      "id": "2019753",
      "postDate": "11/07/2022 00:10:25",
      "content": "<p>Thank you for clarification!</p>",
      "rawMarkdown": "Thank you for clarification!",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2017786,
      "author_name": "radek1",
      "author_url": "",
      "post_date": "11/05/2022 06:40:08",
      "content": "<p>I believe users in test set are users not seen before (at least according to the tracking mechanism that is used). Or rather, not seen since the beginning of the train set.</p>\n<p>A session doesn't have an end date. If a user would perform an activity during the test week, it would just be rolled up to the session that started in train if they were seen before. Essentially, this would be the part that is getting trimmed.</p>\n<p>So all the sessions in test are \"self-contained\" in this sense. They start in the test week (meaning they are by users not see  in train) and last at most 1 week.</p>",
      "votes": null,
      "replies": [
        {
          "id": 2018291,
          "author_name": "ryotak12",
          "author_url": "",
          "post_date": "11/05/2022 15:24:14",
          "content": "<p>I understand your point of view.</p>\n<p>However, if there is no end of the session, why are sessions such as in rows 3 and 7 of the above graph interrupted in the middle of the Train period?<br>\nAlso, the users whose histories are discarded for the test period are represented in one row.</p>\n<p>Shouldn't this graph represent sessions that the Train and Test periods overlap as in rows 2, 4, and 6 of the graph, and new sessions appear in the Test period should be shown in a separate row?</p>\n<p>I feel there is no duplication of users from other discussion comments. However, I think this graph is weird about this graph.<br>\nAm I overthinking this?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 2018687,
          "author_name": "radek1",
          "author_url": "",
          "post_date": "11/05/2022 22:31:20",
          "content": "<p>Hey <a href=\"https://www.kaggle.com/ryotak12\" target=\"_blank\">@ryotak12</a>!</p>\n<p>Not sure if this can be helpful, but here is my reasoning 🙂</p>\n<p>If I understand it correctly, the reason some sessions end in train and don't stretch into the test period, is that they represent genuine user activity. In a sense, there is no end to those sessions, but simply some users who took actions in train have not come onto the platform in test time, have not taken any actions during test.</p>\n<p>For instance, I don't think that the first line represents the same user in train and test. The sessions are just on a single line, but they come from different users (at least that would make sense based on other information shared by the organizer, but this is just my interpretation, I have not seen this specific observation confirmed anywhere directly)</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 2017824,
      "author_name": "keivanipchihagh",
      "author_url": "",
      "post_date": "11/05/2022 07:02:02",
      "content": "<p>I think not. As shown in the picture above the overlapping sessions have been discarded, so you won't see any identical sessions.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 2019221,
      "author_name": "pnormann",
      "author_url": "",
      "post_date": "11/06/2022 12:35:06",
      "content": "<p>Thanks for your question, <a href=\"https://www.kaggle.com/ryotak12\" target=\"_blank\">@ryotak12</a>! Train and Test users are completely disjunct. The rows in the figure have no intended meaning :)</p>",
      "votes": null,
      "replies": [
        {
          "id": 2019753,
          "author_name": "ryotak12",
          "author_url": "",
          "post_date": "11/07/2022 00:10:25",
          "content": "<p>Thank you for clarification!</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "2017682": "From some discussions and GitHub descriptions, we understand that a session represents a unique user's history of events.　\n\nAnd I have confirmed that there are no duplicate sessions in Train and Test.\n\nHowever, looking at the graph below, it appears that Train and Test have identical users. (This graph can be found in the GitHub README. https://github.com/otto-de/recsys-dataset)\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3845682%2Fe097e33b07eee129c8323cf4d1478257%2F2022-11-05%2013.46.14.png?generation=1667624094815429&alt=media)\n\n\nDo Train and Test include the same user? Or am I misinterpreting the figure?\nClarifying this is important in creating validation.",
    "2017786": "I believe users in test set are users not seen before (at least according to the tracking mechanism that is used). Or rather, not seen since the beginning of the train set.\n\nA session doesn't have an end date. If a user would perform an activity during the test week, it would just be rolled up to the session that started in train if they were seen before. Essentially, this would be the part that is getting trimmed.\n\nSo all the sessions in test are \"self-contained\" in this sense. They start in the test week (meaning they are by users not see  in train) and last at most 1 week.",
    "2017824": "I think not. As shown in the picture above the overlapping sessions have been discarded, so you won't see any identical sessions.",
    "2018291": "I understand your point of view.\n\nHowever, if there is no end of the session, why are sessions such as in rows 3 and 7 of the above graph interrupted in the middle of the Train period?\nAlso, the users whose histories are discarded for the test period are represented in one row.\n\nShouldn't this graph represent sessions that the Train and Test periods overlap as in rows 2, 4, and 6 of the graph, and new sessions appear in the Test period should be shown in a separate row?\n\nI feel there is no duplication of users from other discussion comments. However, I think this graph is weird about this graph.\nAm I overthinking this?",
    "2018687": "Hey @ryotak12!\n\nNot sure if this can be helpful, but here is my reasoning 🙂\n\nIf I understand it correctly, the reason some sessions end in train and don't stretch into the test period, is that they represent genuine user activity. In a sense, there is no end to those sessions, but simply some users who took actions in train have not come onto the platform in test time, have not taken any actions during test.\n\nFor instance, I don't think that the first line represents the same user in train and test. The sessions are just on a single line, but they come from different users (at least that would make sense based on other information shared by the organizer, but this is just my interpretation, I have not seen this specific observation confirmed anywhere directly)",
    "2019221": "Thanks for your question, @ryotak12! Train and Test users are completely disjunct. The rows in the figure have no intended meaning :)",
    "2019753": "Thank you for clarification!"
  },
  "source": "meta"
}