{
  "id": 196921,
  "title": "Still confused about prior_question_elapsed_time",
  "url": "/competitions/riiid-test-answer-prediction/discussion/196921",
  "author_name": "",
  "post_date": "2020-11-13T12:16:37.807402800Z",
  "votes": 12,
  "comment_count": 7,
  "views": 0,
  "content": "<p>My understanding so far is:<br>\n(See discussions like: <a href=\"https://www.kaggle.com/c/riiid-test-answer-prediction/discussion/189351\" target=\"_blank\">https://www.kaggle.com/c/riiid-test-answer-prediction/discussion/189351</a>)</p>\n<p>timestamp: time when action ended - with end of first action being the 0 mark<br>\nprior_question_elapsed_time: Average time per question of LAST question/set of questions.</p>\n<p>If this is the case: </p>\n<p>How can prior_question_elapsed_time be not NaN for first action of some users?</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F449263%2F2fa4e9baa35cef6de528bf5c1470acb9%2Fprior_question_elapsed_time.png?generation=1605269696873806&amp;alt=media\" alt=\"\"></p>\n<p>Not sure if I am missing anything here? <a href=\"https://www.kaggle.com/sohier\" target=\"_blank\">@sohier</a> </p>",
  "messages": [
    {
      "id": "1077274",
      "postDate": "11/13/2020 12:16:37",
      "content": "<p>My understanding so far is:<br>\n(See discussions like: <a href=\"https://www.kaggle.com/c/riiid-test-answer-prediction/discussion/189351\" target=\"_blank\">https://www.kaggle.com/c/riiid-test-answer-prediction/discussion/189351</a>)</p>\n<p>timestamp: time when action ended - with end of first action being the 0 mark<br>\nprior_question_elapsed_time: Average time per question of LAST question/set of questions.</p>\n<p>If this is the case: </p>\n<p>How can prior_question_elapsed_time be not NaN for first action of some users?</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F449263%2F2fa4e9baa35cef6de528bf5c1470acb9%2Fprior_question_elapsed_time.png?generation=1605269696873806&amp;alt=media\" alt=\"\"></p>\n<p>Not sure if I am missing anything here? <a href=\"https://www.kaggle.com/sohier\" target=\"_blank\">@sohier</a> </p>",
      "rawMarkdown": "My understanding so far is:\n(See discussions like: https://www.kaggle.com/c/riiid-test-answer-prediction/discussion/189351)\n\ntimestamp: time when action ended - with end of first action being the 0 mark\nprior_question_elapsed_time: Average time per question of LAST question/set of questions.\n\nIf this is the case: \n\nHow can prior_question_elapsed_time be not NaN for first action of some users?\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F449263%2F2fa4e9baa35cef6de528bf5c1470acb9%2Fprior_question_elapsed_time.png?generation=1605269696873806&alt=media)\n\nNot sure if I am missing anything here? @sohier",
      "votes": null
    },
    {
      "id": "1077280",
      "postDate": "11/13/2020 12:22:25",
      "content": "<p>Given that the value for first two task containers is the same (just quick checked on this one sample above) maybe there was a problem in data preparation that the NaN was not set correctly?</p>",
      "rawMarkdown": "Given that the value for first two task containers is the same (just quick checked on this one sample above) maybe there was a problem in data preparation that the NaN was not set correctly?",
      "votes": null
    },
    {
      "id": "1077306",
      "postDate": "11/13/2020 12:57:53",
      "content": "<p>Good find! I checked it as well. Seems like it happens when the first questions are a bundle (share same task container id). Should be NaN I suppose. But the value is the same as the value of the next task container id - like you mentioned.</p>",
      "rawMarkdown": "Good find! I checked it as well. Seems like it happens when the first questions are a bundle (share same task container id). Should be NaN I suppose. But the value is the same as the value of the next task container id - like you mentioned.",
      "votes": null
    },
    {
      "id": "1077341",
      "postDate": "11/13/2020 13:44:12",
      "content": "<p>I was about to suggest that a dirty-hack-quick-fix might be something like:</p>\n<p><code>train.loc[train.task_container_id == 0, 'prior_question_elapsed_time'] = VALUE</code></p>\n<p>but then I realized that for example user 1752395680 starts with task_container_id 1 for lecture and 2 for questions …</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F449263%2F6542a5b15829925d5cc934dae25ad822%2Fprior_question_elapsed_time_v02.png?generation=1605274939955491&amp;alt=media\" alt=\"\"></p>\n<p>Anybody understanding this? <a href=\"https://www.kaggle.com/sohier\" target=\"_blank\">@sohier</a> </p>\n<p>PS: My assumption of course is that the train/test split in this competition is respecting time….</p>",
      "rawMarkdown": "I was about to suggest that a dirty-hack-quick-fix might be something like:\n\n`train.loc[train.task_container_id == 0, 'prior_question_elapsed_time'] = VALUE`\n\nbut then I realized that for example user 1752395680 starts with task_container_id 1 for lecture and 2 for questions ...\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F449263%2F6542a5b15829925d5cc934dae25ad822%2Fprior_question_elapsed_time_v02.png?generation=1605274939955491&alt=media)\n\nAnybody understanding this? @sohier \n\nPS: My assumption of course is that the train/test split in this competition is respecting time....",
      "votes": null
    },
    {
      "id": "1077366",
      "postDate": "11/13/2020 14:22:27",
      "content": "<p>Well there's no assurance that you have the data right from a user's history starting, right?</p>",
      "rawMarkdown": "Well there's no assurance that you have the data right from a user's history starting, right?",
      "votes": null
    },
    {
      "id": "1077369",
      "postDate": "11/13/2020 14:23:59",
      "content": "<p>Then I would expect a non zero timestamp for consistency?</p>",
      "rawMarkdown": "Then I would expect a non zero timestamp for consistency?",
      "votes": null
    },
    {
      "id": "1077875",
      "postDate": "11/14/2020 03:26:57",
      "content": "<p>This is the same questions with mine (2 posts below): <a href=\"https://www.kaggle.com/c/riiid-test-answer-prediction/discussion/196879\" target=\"_blank\">https://www.kaggle.com/c/riiid-test-answer-prediction/discussion/196879</a>! I still don't understand why it has not NaN value even though they have <code>timestamp</code> of 0…. </p>",
      "rawMarkdown": "This is the same questions with mine (2 posts below): https://www.kaggle.com/c/riiid-test-answer-prediction/discussion/196879! I still don't understand why it has not NaN value even though they have `timestamp` of 0....",
      "votes": null
    },
    {
      "id": "1126969",
      "postDate": "12/26/2020 06:19:44",
      "content": "<p><a href=\"https://www.kaggle.com/matthiasanderer\" target=\"_blank\">@matthiasanderer</a> <br>\nto ensure prior time refers to last q attempted in sequence while training ,relying on timestamp order is sufficient ?</p>",
      "rawMarkdown": "matthiasanderer \nto ensure prior time refers to last q attempted in sequence while training ,relying on timestamp order is sufficient ?",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1077280,
      "author_name": "matthiasanderer",
      "author_url": "",
      "post_date": "11/13/2020 12:22:25",
      "content": "<p>Given that the value for first two task containers is the same (just quick checked on this one sample above) maybe there was a problem in data preparation that the NaN was not set correctly?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1077306,
      "author_name": "rafiko1",
      "author_url": "",
      "post_date": "11/13/2020 12:57:53",
      "content": "<p>Good find! I checked it as well. Seems like it happens when the first questions are a bundle (share same task container id). Should be NaN I suppose. But the value is the same as the value of the next task container id - like you mentioned.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1077341,
      "author_name": "matthiasanderer",
      "author_url": "",
      "post_date": "11/13/2020 13:44:12",
      "content": "<p>I was about to suggest that a dirty-hack-quick-fix might be something like:</p>\n<p><code>train.loc[train.task_container_id == 0, 'prior_question_elapsed_time'] = VALUE</code></p>\n<p>but then I realized that for example user 1752395680 starts with task_container_id 1 for lecture and 2 for questions …</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F449263%2F6542a5b15829925d5cc934dae25ad822%2Fprior_question_elapsed_time_v02.png?generation=1605274939955491&amp;alt=media\" alt=\"\"></p>\n<p>Anybody understanding this? <a href=\"https://www.kaggle.com/sohier\" target=\"_blank\">@sohier</a> </p>\n<p>PS: My assumption of course is that the train/test split in this competition is respecting time….</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1077366,
      "author_name": "adityaecdrid",
      "author_url": "",
      "post_date": "11/13/2020 14:22:27",
      "content": "<p>Well there's no assurance that you have the data right from a user's history starting, right?</p>",
      "votes": null,
      "replies": [
        {
          "id": 1077369,
          "author_name": "matthiasanderer",
          "author_url": "",
          "post_date": "11/13/2020 14:23:59",
          "content": "<p>Then I would expect a non zero timestamp for consistency?</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1077875,
      "author_name": "choisgood",
      "author_url": "",
      "post_date": "11/14/2020 03:26:57",
      "content": "<p>This is the same questions with mine (2 posts below): <a href=\"https://www.kaggle.com/c/riiid-test-answer-prediction/discussion/196879\" target=\"_blank\">https://www.kaggle.com/c/riiid-test-answer-prediction/discussion/196879</a>! I still don't understand why it has not NaN value even though they have <code>timestamp</code> of 0…. </p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1126969,
      "author_name": "jaideepvalani",
      "author_url": "",
      "post_date": "12/26/2020 06:19:44",
      "content": "<p><a href=\"https://www.kaggle.com/matthiasanderer\" target=\"_blank\">@matthiasanderer</a> <br>\nto ensure prior time refers to last q attempted in sequence while training ,relying on timestamp order is sufficient ?</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1077274": "My understanding so far is:\n(See discussions like: https://www.kaggle.com/c/riiid-test-answer-prediction/discussion/189351)\n\ntimestamp: time when action ended - with end of first action being the 0 mark\nprior_question_elapsed_time: Average time per question of LAST question/set of questions.\n\nIf this is the case: \n\nHow can prior_question_elapsed_time be not NaN for first action of some users?\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F449263%2F2fa4e9baa35cef6de528bf5c1470acb9%2Fprior_question_elapsed_time.png?generation=1605269696873806&alt=media)\n\nNot sure if I am missing anything here? @sohier",
    "1077280": "Given that the value for first two task containers is the same (just quick checked on this one sample above) maybe there was a problem in data preparation that the NaN was not set correctly?",
    "1077306": "Good find! I checked it as well. Seems like it happens when the first questions are a bundle (share same task container id). Should be NaN I suppose. But the value is the same as the value of the next task container id - like you mentioned.",
    "1077341": "I was about to suggest that a dirty-hack-quick-fix might be something like:\n\n`train.loc[train.task_container_id == 0, 'prior_question_elapsed_time'] = VALUE`\n\nbut then I realized that for example user 1752395680 starts with task_container_id 1 for lecture and 2 for questions ...\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F449263%2F6542a5b15829925d5cc934dae25ad822%2Fprior_question_elapsed_time_v02.png?generation=1605274939955491&alt=media)\n\nAnybody understanding this? @sohier \n\nPS: My assumption of course is that the train/test split in this competition is respecting time....",
    "1077366": "Well there's no assurance that you have the data right from a user's history starting, right?",
    "1077369": "Then I would expect a non zero timestamp for consistency?",
    "1077875": "This is the same questions with mine (2 posts below): https://www.kaggle.com/c/riiid-test-answer-prediction/discussion/196879! I still don't understand why it has not NaN value even though they have `timestamp` of 0....",
    "1126969": "matthiasanderer \nto ensure prior time refers to last q attempted in sequence while training ,relying on timestamp order is sufficient ?"
  },
  "source": "meta"
}