{
  "id": 370070,
  "title": "How can a session start with an order?",
  "url": "/competitions/otto-recommender-system/discussion/370070",
  "author_name": "",
  "post_date": "2022-12-02T20:29:08.035977Z",
  "votes": 10,
  "comment_count": 5,
  "views": 0,
  "content": "<p>I am just starting here hence my qusiotn may be silly.</p>\n<p>I assumed that the flow for a given article was clik -&gt; cart - order, i.e. that to be ordered an article had to be first put in a cart. </p>\n<p>Yet, some sessions start with a cart, and some start with an order.  Here are the value counts of the first type in a session (0 is click, 1 is cart, and 2 is order):</p>\n<pre><code>    \n       \n       \n</code></pre>\n<p>Here is an example of a session starting with an order, namely session 6247320:</p>\n<pre><code>              session.    aid.    ts.         type\n146764905     6247320      651317     1660083430  2\n146764906     6247320     1147911     1660083444  0\n146764907     6247320      509858     1660083618  0\n146764908     6247320      509858     1660083629  1\n146764909     6247320      189572     1660083652  0\n...     ...     ...     ...     ...\n146765291     6247320     1131150     1660166257  0\n146765292     6247320     1131150     1660166264  1\n146765293     6247320     1022249     1660166283  0\n146765294     6247320     1022249     1660166289  1\n146765295     6247320     1022249     1660166488  2\n</code></pre>\n<p>How can a session start with an order? What am I missing?</p>",
  "messages": [
    {
      "id": "2053098",
      "postDate": "12/02/2022 20:29:08",
      "content": "<p>I am just starting here hence my qusiotn may be silly.</p>\n<p>I assumed that the flow for a given article was clik -&gt; cart - order, i.e. that to be ordered an article had to be first put in a cart. </p>\n<p>Yet, some sessions start with a cart, and some start with an order.  Here are the value counts of the first type in a session (0 is click, 1 is cart, and 2 is order):</p>\n<pre><code>    \n       \n       \n</code></pre>\n<p>Here is an example of a session starting with an order, namely session 6247320:</p>\n<pre><code>              session.    aid.    ts.         type\n146764905     6247320      651317     1660083430  2\n146764906     6247320     1147911     1660083444  0\n146764907     6247320      509858     1660083618  0\n146764908     6247320      509858     1660083629  1\n146764909     6247320      189572     1660083652  0\n...     ...     ...     ...     ...\n146765291     6247320     1131150     1660166257  0\n146765292     6247320     1131150     1660166264  1\n146765293     6247320     1022249     1660166283  0\n146765294     6247320     1022249     1660166289  1\n146765295     6247320     1022249     1660166488  2\n</code></pre>\n<p>How can a session start with an order? What am I missing?</p>",
      "rawMarkdown": "I am just starting here hence my qusiotn may be silly.\n\nI assumed that the flow for a given article was clik -> cart - order, i.e. that to be ordered an article had to be first put in a cart. \n\nYet, some sessions start with a cart, and some start with an order.  Here are the value counts of the first type in a session (0 is click, 1 is cart, and 2 is order):\n```python\n0    12844207\n1       37856\n2       17716\n\n```\n\nHere is an example of a session starting with an order, namely session 6247320:\n\n```\n              session.    aid.    ts.         type\n146764905 \t6247320 \t 651317 \t1660083430 \t2\n146764906 \t6247320 \t1147911 \t1660083444 \t0\n146764907 \t6247320 \t 509858 \t1660083618 \t0\n146764908 \t6247320 \t 509858 \t1660083629 \t1\n146764909 \t6247320 \t 189572 \t1660083652 \t0\n... \t... \t... \t... \t...\n146765291 \t6247320 \t1131150 \t1660166257 \t0\n146765292 \t6247320 \t1131150 \t1660166264 \t1\n146765293 \t6247320 \t1022249 \t1660166283 \t0\n146765294 \t6247320 \t1022249 \t1660166289 \t1\n146765295 \t6247320 \t1022249 \t1660166488 \t2\n```\n\nHow can a session start with an order? What am I missing?",
      "votes": null
    },
    {
      "id": "2053138",
      "postDate": "12/02/2022 21:26:38",
      "content": "<p>I believe host responded this question is another thread. It may happen that for some sessions a user may have added aid's to the cart before the session acquisiton start, that way, when host started acquisition the user already have items in the cart. So, yes, we can have sessions with trimmed starts as well.</p>",
      "rawMarkdown": "I believe host responded this question is another thread. It may happen that for some sessions a user may have added aid's to the cart before the session acquisiton start, that way, when host started acquisition the user already have items in the cart. So, yes, we can have sessions with trimmed starts as well.",
      "votes": null
    },
    {
      "id": "2053691",
      "postDate": "12/03/2022 14:10:36",
      "content": "<p>link: <a href=\"https://www.kaggle.com/competitions/otto-recommender-system/discussion/363973\" target=\"_blank\">https://www.kaggle.com/competitions/otto-recommender-system/discussion/363973</a></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3013044%2Ff7d3756aea40e6cf842b47175f281d82%2Fimg.png?generation=1670076627191117&amp;alt=media\" alt=\"\"></p>\n<p>EDIT: I found a <a href=\"https://www.kaggle.com/competitions/otto-recommender-system/discussion/364064\" target=\"_blank\">more popular thread</a> concerning a similar topic.</p>",
      "rawMarkdown": "link: https://www.kaggle.com/competitions/otto-recommender-system/discussion/363973\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3013044%2Ff7d3756aea40e6cf842b47175f281d82%2Fimg.png?generation=1670076627191117&alt=media)\n\n\nEDIT: I found a [more popular thread](https://www.kaggle.com/competitions/otto-recommender-system/discussion/364064) concerning a similar topic.",
      "votes": null
    },
    {
      "id": "2054848",
      "postDate": "12/04/2022 13:41:00",
      "content": "<p>if you are looking for pattern from 0, 1, 2, then remove those started from 2, 1 from data set. </p>",
      "rawMarkdown": "if you are looking for pattern from 0, 1, 2, then remove those started from 2, 1 from data set.",
      "votes": null
    },
    {
      "id": "2055172",
      "postDate": "12/04/2022 19:33:23",
      "content": "<p><a href=\"https://www.kaggle.com/seholee\" target=\"_blank\">@seholee</a> thanks for both links. I thought I already thanked you but it seems i did not press the post comment button!</p>",
      "rawMarkdown": "seholee thanks for both links. I thought I already thanked you but it seems i did not press the post comment button!",
      "votes": null
    },
    {
      "id": "2055173",
      "postDate": "12/04/2022 19:34:23",
      "content": "<p>It is mot complex than that I'm afraid.</p>",
      "rawMarkdown": "It is mot complex than that I'm afraid.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2053138,
      "author_name": "titericz",
      "author_url": "",
      "post_date": "12/02/2022 21:26:38",
      "content": "<p>I believe host responded this question is another thread. It may happen that for some sessions a user may have added aid's to the cart before the session acquisiton start, that way, when host started acquisition the user already have items in the cart. So, yes, we can have sessions with trimmed starts as well.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 2053691,
      "author_name": "seholee",
      "author_url": "",
      "post_date": "12/03/2022 14:10:36",
      "content": "<p>link: <a href=\"https://www.kaggle.com/competitions/otto-recommender-system/discussion/363973\" target=\"_blank\">https://www.kaggle.com/competitions/otto-recommender-system/discussion/363973</a></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3013044%2Ff7d3756aea40e6cf842b47175f281d82%2Fimg.png?generation=1670076627191117&amp;alt=media\" alt=\"\"></p>\n<p>EDIT: I found a <a href=\"https://www.kaggle.com/competitions/otto-recommender-system/discussion/364064\" target=\"_blank\">more popular thread</a> concerning a similar topic.</p>",
      "votes": null,
      "replies": [
        {
          "id": 2055172,
          "author_name": "cpmpml",
          "author_url": "",
          "post_date": "12/04/2022 19:33:23",
          "content": "<p><a href=\"https://www.kaggle.com/seholee\" target=\"_blank\">@seholee</a> thanks for both links. I thought I already thanked you but it seems i did not press the post comment button!</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 2054848,
      "author_name": "tyeestudio",
      "author_url": "",
      "post_date": "12/04/2022 13:41:00",
      "content": "<p>if you are looking for pattern from 0, 1, 2, then remove those started from 2, 1 from data set. </p>",
      "votes": null,
      "replies": [
        {
          "id": 2055173,
          "author_name": "cpmpml",
          "author_url": "",
          "post_date": "12/04/2022 19:34:23",
          "content": "<p>It is mot complex than that I'm afraid.</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "2053098": "I am just starting here hence my qusiotn may be silly.\n\nI assumed that the flow for a given article was clik -> cart - order, i.e. that to be ordered an article had to be first put in a cart. \n\nYet, some sessions start with a cart, and some start with an order.  Here are the value counts of the first type in a session (0 is click, 1 is cart, and 2 is order):\n```python\n0    12844207\n1       37856\n2       17716\n\n```\n\nHere is an example of a session starting with an order, namely session 6247320:\n\n```\n              session.    aid.    ts.         type\n146764905 \t6247320 \t 651317 \t1660083430 \t2\n146764906 \t6247320 \t1147911 \t1660083444 \t0\n146764907 \t6247320 \t 509858 \t1660083618 \t0\n146764908 \t6247320 \t 509858 \t1660083629 \t1\n146764909 \t6247320 \t 189572 \t1660083652 \t0\n... \t... \t... \t... \t...\n146765291 \t6247320 \t1131150 \t1660166257 \t0\n146765292 \t6247320 \t1131150 \t1660166264 \t1\n146765293 \t6247320 \t1022249 \t1660166283 \t0\n146765294 \t6247320 \t1022249 \t1660166289 \t1\n146765295 \t6247320 \t1022249 \t1660166488 \t2\n```\n\nHow can a session start with an order? What am I missing?",
    "2053138": "I believe host responded this question is another thread. It may happen that for some sessions a user may have added aid's to the cart before the session acquisiton start, that way, when host started acquisition the user already have items in the cart. So, yes, we can have sessions with trimmed starts as well.",
    "2053691": "link: https://www.kaggle.com/competitions/otto-recommender-system/discussion/363973\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3013044%2Ff7d3756aea40e6cf842b47175f281d82%2Fimg.png?generation=1670076627191117&alt=media)\n\n\nEDIT: I found a [more popular thread](https://www.kaggle.com/competitions/otto-recommender-system/discussion/364064) concerning a similar topic.",
    "2054848": "if you are looking for pattern from 0, 1, 2, then remove those started from 2, 1 from data set.",
    "2055172": "seholee thanks for both links. I thought I already thanked you but it seems i did not press the post comment button!",
    "2055173": "It is mot complex than that I'm afraid."
  },
  "source": "meta"
}