{
  "id": 363554,
  "title": "what does a session mean?",
  "url": "/competitions/otto-recommender-system/discussion/363554",
  "author_name": "",
  "post_date": "2022-11-02T06:35:02.118038900Z",
  "votes": 32,
  "comment_count": 10,
  "views": 0,
  "content": "<p>Does it mean a unique customer? or A unique visiting session from logging in to logging out?</p>",
  "messages": [
    {
      "id": "2013827",
      "postDate": "11/02/2022 06:35:02",
      "content": "<p>Does it mean a unique customer? or A unique visiting session from logging in to logging out?</p>",
      "rawMarkdown": "Does it mean a unique customer? or A unique visiting session from logging in to logging out?",
      "votes": null
    },
    {
      "id": "2013926",
      "postDate": "11/02/2022 07:52:57",
      "content": "<p>Based on my understanding, session can be treated as individual user.</p>",
      "rawMarkdown": "Based on my understanding, session can be treated as individual user.",
      "votes": null
    },
    {
      "id": "2013957",
      "postDate": "11/02/2022 08:14:04",
      "content": "<p>My understanding is that it is a user session - It is used for tracking user behavior  and purchase/behavioural analytics. It is used extensively by tools such as Google Analytics <a href=\"https://support.google.com/analytics/answer/2795871?hl=en\" target=\"_blank\">https://support.google.com/analytics/answer/2795871?hl=en</a> by e-commerce sites!</p>",
      "rawMarkdown": "My understanding is that it is a user session - It is used for tracking user behavior  and purchase/behavioural analytics. It is used extensively by tools such as Google Analytics https://support.google.com/analytics/answer/2795871?hl=en by e-commerce sites!",
      "votes": null
    },
    {
      "id": "2013985",
      "postDate": "11/02/2022 08:32:48",
      "content": "<p>I thought so too until I noticed that the events of a session can last for a month and can have several orders. </p>",
      "rawMarkdown": "I thought so too until I noticed that the events of a session can last for a month and can have several orders.",
      "votes": null
    },
    {
      "id": "2015468",
      "postDate": "11/03/2022 09:51:07",
      "content": "<p>It is not really all that important 🙂 By saying this is a session-based recommendation problem all we mean is that we will be working on a sequence of data, ideally parsed in chronological order. Here the sequences describe actions taken by a user.</p>\n<p>\"Session\" can have the same meaning as it has for browsers -- a session is alive for how long you keep your browser window open. And I keep my browser open for a really long time 😄 That would be the \"technical\" interpretation of a session. Companies can do various things, can define a session in some other way, but even if the definition I suggest above was used by Otto, I don't think one should be surprised to see sessions spanning several weeks given how people use their computers these days 🙂 (putting them in standby/hibernate and rarely every restarting)</p>",
      "rawMarkdown": "It is not really all that important 🙂 By saying this is a session-based recommendation problem all we mean is that we will be working on a sequence of data, ideally parsed in chronological order. Here the sequences describe actions taken by a user.\n\n\"Session\" can have the same meaning as it has for browsers -- a session is alive for how long you keep your browser window open. And I keep my browser open for a really long time 😄 That would be the \"technical\" interpretation of a session. Companies can do various things, can define a session in some other way, but even if the definition I suggest above was used by Otto, I don't think one should be surprised to see sessions spanning several weeks given how people use their computers these days 🙂 (putting them in standby/hibernate and rarely every restarting)",
      "votes": null
    },
    {
      "id": "2015486",
      "postDate": "11/03/2022 10:08:00",
      "content": "<p>Hey <a href=\"https://www.kaggle.com/xxxxyyyy80008\" target=\"_blank\">@xxxxyyyy80008</a>, thanks for your question! </p>\n<p>In this dataset, a <code>session</code> represents all <code>events</code> of a unique user (either the same browser or, if logged in, also cross-device) from the whole data extraction period. This kind of aggregation does not reflect the traditional session definition but should give you the most freedom in the preprocessing and modeling approaches for the competition.</p>\n<p>I hope this helps 😌</p>",
      "rawMarkdown": "Hey @xxxxyyyy80008, thanks for your question! \n\nIn this dataset, a `session` represents all `events` of a unique user (either the same browser or, if logged in, also cross-device) from the whole data extraction period. This kind of aggregation does not reflect the traditional session definition but should give you the most freedom in the preprocessing and modeling approaches for the competition.\n\nI hope this helps 😌",
      "votes": null
    },
    {
      "id": "2015511",
      "postDate": "11/03/2022 10:44:15",
      "content": "<p>Thanks a lot! This helps. In other words, <code>a session</code> is a <code>unique user</code> in data extraction period. </p>",
      "rawMarkdown": "Thanks a lot! This helps. In other words, `a session` is a `unique user` in data extraction period.",
      "votes": null
    },
    {
      "id": "2016324",
      "postDate": "11/03/2022 23:19:23",
      "content": "<p>Mmmm but if a user makes a purchase on a different day he will not have the same <code>session</code> right? The downside if this is true is that this dataset does not capture user preferences or user purchasing patterns. <a href=\"https://www.kaggle.com/pnormann\" target=\"_blank\">@pnormann</a> </p>",
      "rawMarkdown": "Mmmm but if a user makes a purchase on a different day he will not have the same `session` right? The downside if this is true is that this dataset does not capture user preferences or user purchasing patterns. @pnormann",
      "votes": null
    },
    {
      "id": "2016337",
      "postDate": "11/03/2022 23:33:58",
      "content": "<p>Don't worry <a href=\"https://www.kaggle.com/moth\" target=\"_blank\">@moth</a>. This is not the case. User sessions in the dataset represent entire customer journeys during the data extraction period and can extend over multiple days.</p>",
      "rawMarkdown": "Don't worry @moth. This is not the case. User sessions in the dataset represent entire customer journeys during the data extraction period and can extend over multiple days.",
      "votes": null
    },
    {
      "id": "2017072",
      "postDate": "11/04/2022 13:19:17",
      "content": "<p>Thanks for the explanation</p>",
      "rawMarkdown": "Thanks for the explanation",
      "votes": null
    },
    {
      "id": "2020950",
      "postDate": "11/07/2022 21:46:17",
      "content": "<p>A session is all activity by a single user either in the train or the test set.</p>\n<p>To be sure you can see that, the train set is four weeks or 672 hours. If you look at the maximum session duration:</p>\n<pre><code>session_duration = train.groupby().apply( x: (x[].values[-] - x[].values[])/(**))\nsession_duration.()\n</code></pre>\n<p>is indeed 672, meaning that some individuals have been active at the very beginning and at the very end of the training set.</p>",
      "rawMarkdown": "A session is all activity by a single user either in the train or the test set.\n\nTo be sure you can see that, the train set is four weeks or 672 hours. If you look at the maximum session duration:\n```python\nsession_duration = train.groupby('session').apply(lambda x: (x['ts'].values[-1] - x['ts'].values[0])/(1000*60*60))\nsession_duration.max()\n```\nis indeed 672, meaning that some individuals have been active at the very beginning and at the very end of the training set.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2013926,
      "author_name": "shijindashu",
      "author_url": "",
      "post_date": "11/02/2022 07:52:57",
      "content": "<p>Based on my understanding, session can be treated as individual user.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 2013957,
      "author_name": "kalilurrahman",
      "author_url": "",
      "post_date": "11/02/2022 08:14:04",
      "content": "<p>My understanding is that it is a user session - It is used for tracking user behavior  and purchase/behavioural analytics. It is used extensively by tools such as Google Analytics <a href=\"https://support.google.com/analytics/answer/2795871?hl=en\" target=\"_blank\">https://support.google.com/analytics/answer/2795871?hl=en</a> by e-commerce sites!</p>",
      "votes": null,
      "replies": [
        {
          "id": 2013985,
          "author_name": "xxxxyyyy80008",
          "author_url": "",
          "post_date": "11/02/2022 08:32:48",
          "content": "<p>I thought so too until I noticed that the events of a session can last for a month and can have several orders. </p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 2015468,
      "author_name": "radek1",
      "author_url": "",
      "post_date": "11/03/2022 09:51:07",
      "content": "<p>It is not really all that important 🙂 By saying this is a session-based recommendation problem all we mean is that we will be working on a sequence of data, ideally parsed in chronological order. Here the sequences describe actions taken by a user.</p>\n<p>\"Session\" can have the same meaning as it has for browsers -- a session is alive for how long you keep your browser window open. And I keep my browser open for a really long time 😄 That would be the \"technical\" interpretation of a session. Companies can do various things, can define a session in some other way, but even if the definition I suggest above was used by Otto, I don't think one should be surprised to see sessions spanning several weeks given how people use their computers these days 🙂 (putting them in standby/hibernate and rarely every restarting)</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 2015486,
      "author_name": "pnormann",
      "author_url": "",
      "post_date": "11/03/2022 10:08:00",
      "content": "<p>Hey <a href=\"https://www.kaggle.com/xxxxyyyy80008\" target=\"_blank\">@xxxxyyyy80008</a>, thanks for your question! </p>\n<p>In this dataset, a <code>session</code> represents all <code>events</code> of a unique user (either the same browser or, if logged in, also cross-device) from the whole data extraction period. This kind of aggregation does not reflect the traditional session definition but should give you the most freedom in the preprocessing and modeling approaches for the competition.</p>\n<p>I hope this helps 😌</p>",
      "votes": null,
      "replies": [
        {
          "id": 2015511,
          "author_name": "xxxxyyyy80008",
          "author_url": "",
          "post_date": "11/03/2022 10:44:15",
          "content": "<p>Thanks a lot! This helps. In other words, <code>a session</code> is a <code>unique user</code> in data extraction period. </p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 2016324,
          "author_name": "alejopaullier",
          "author_url": "",
          "post_date": "11/03/2022 23:19:23",
          "content": "<p>Mmmm but if a user makes a purchase on a different day he will not have the same <code>session</code> right? The downside if this is true is that this dataset does not capture user preferences or user purchasing patterns. <a href=\"https://www.kaggle.com/pnormann\" target=\"_blank\">@pnormann</a> </p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 2016337,
          "author_name": "pnormann",
          "author_url": "",
          "post_date": "11/03/2022 23:33:58",
          "content": "<p>Don't worry <a href=\"https://www.kaggle.com/moth\" target=\"_blank\">@moth</a>. This is not the case. User sessions in the dataset represent entire customer journeys during the data extraction period and can extend over multiple days.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 2017072,
          "author_name": "alejopaullier",
          "author_url": "",
          "post_date": "11/04/2022 13:19:17",
          "content": "<p>Thanks for the explanation</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 2020950,
      "author_name": "davidgauthier",
      "author_url": "",
      "post_date": "11/07/2022 21:46:17",
      "content": "<p>A session is all activity by a single user either in the train or the test set.</p>\n<p>To be sure you can see that, the train set is four weeks or 672 hours. If you look at the maximum session duration:</p>\n<pre><code>session_duration = train.groupby().apply( x: (x[].values[-] - x[].values[])/(**))\nsession_duration.()\n</code></pre>\n<p>is indeed 672, meaning that some individuals have been active at the very beginning and at the very end of the training set.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2013827": "Does it mean a unique customer? or A unique visiting session from logging in to logging out?",
    "2013926": "Based on my understanding, session can be treated as individual user.",
    "2013957": "My understanding is that it is a user session - It is used for tracking user behavior  and purchase/behavioural analytics. It is used extensively by tools such as Google Analytics https://support.google.com/analytics/answer/2795871?hl=en by e-commerce sites!",
    "2013985": "I thought so too until I noticed that the events of a session can last for a month and can have several orders.",
    "2015468": "It is not really all that important 🙂 By saying this is a session-based recommendation problem all we mean is that we will be working on a sequence of data, ideally parsed in chronological order. Here the sequences describe actions taken by a user.\n\n\"Session\" can have the same meaning as it has for browsers -- a session is alive for how long you keep your browser window open. And I keep my browser open for a really long time 😄 That would be the \"technical\" interpretation of a session. Companies can do various things, can define a session in some other way, but even if the definition I suggest above was used by Otto, I don't think one should be surprised to see sessions spanning several weeks given how people use their computers these days 🙂 (putting them in standby/hibernate and rarely every restarting)",
    "2015486": "Hey @xxxxyyyy80008, thanks for your question! \n\nIn this dataset, a `session` represents all `events` of a unique user (either the same browser or, if logged in, also cross-device) from the whole data extraction period. This kind of aggregation does not reflect the traditional session definition but should give you the most freedom in the preprocessing and modeling approaches for the competition.\n\nI hope this helps 😌",
    "2015511": "Thanks a lot! This helps. In other words, `a session` is a `unique user` in data extraction period.",
    "2016324": "Mmmm but if a user makes a purchase on a different day he will not have the same `session` right? The downside if this is true is that this dataset does not capture user preferences or user purchasing patterns. @pnormann",
    "2016337": "Don't worry @moth. This is not the case. User sessions in the dataset represent entire customer journeys during the data extraction period and can extend over multiple days.",
    "2017072": "Thanks for the explanation",
    "2020950": "A session is all activity by a single user either in the train or the test set.\n\nTo be sure you can see that, the train set is four weeks or 672 hours. If you look at the maximum session duration:\n```python\nsession_duration = train.groupby('session').apply(lambda x: (x['ts'].values[-1] - x['ts'].values[0])/(1000*60*60))\nsession_duration.max()\n```\nis indeed 672, meaning that some individuals have been active at the very beginning and at the very end of the training set."
  },
  "source": "meta"
}