{
  "id": 210215,
  "title": "A strong feature about task_container_id",
  "url": "/competitions/riiid-test-answer-prediction/discussion/210215",
  "author_name": "MeeCreeps",
  "post_date": "2021-01-10T04:42:24.728000",
  "votes": 8,
  "comment_count": 0,
  "views": 0,
  "content": "<p>There has been a lot of discussion on <code>container_id</code>, and <a href=\"https://www.kaggle.com/c/riiid-test-answer-prediction/discussion/189465\" target=\"_blank\">this discussion</a> points out the problem on inconsistency between <code>timestamp</code> and <code>task_container_id</code>, as shown in below picture.<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2293617%2Fd37d94623f3bf00934f2479af90f8040%2Fkaggle_riiid_1.png?generation=1610252567534467&amp;alt=media\" alt=\"Figure 1.\"></p>\n<p>According to answer by Kaggle staff in other <a href=\"https://www.kaggle.com/c/riiid-test-answer-prediction/discussion/189351#1041405\" target=\"_blank\">discussion</a>, the <code>timestamp</code> column shows when an activity is finished, not when it started. The <code>task_container_id</code> comes from a scenario where the user gets a batch of questions each time they do a task, and the <code>task_container_id</code> represents the number of batch starting from 0 and increasing, so the <code>task_container_id</code>  reflects the order in which the user starts the task. If users work on one batch of questions and then the next batch of questions, then the <code>task_container_id</code> should increase with <code>timestamp</code>. Below picture shows this scenario where one batch of questions is completed and then the next batch is completed (the number in the box represents <code>task_container_id</code>).</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2293617%2F084ad07947075ae2e35f0bb814dd1a1e%2Fkaggle_riiid_2.png?generation=1610253099661857&amp;alt=media\" alt=\"\"></p>\n<p>But when we were in school, our teachers should have taught us that if we don't know how to answer a question , we should skip it first and do it later. This is the reason for the discontinuous of <code>task_container_id</code>. For example, in below picture, the user doesn't know how to do the questions with <code>task_container_id</code> of 1, so answer the questions with <code>task_container_id</code> of 2 first. Questions with <code>task_container_id</code> of 2 are easy to answer, and then go back to the questions with <code>task_container_id</code> of 1. Thus, the <code>task_container_id</code> does not automatically increment with <code>timestamp</code>. From this phenomenon we can construct a strong feature: the difference between the <code>task_container_id</code> of the current batch and that of the previous batch. The greater the absolute value of the difference, the more the user skip in current question. </p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2293617%2Fcc3c2fa6d6f24b0d62abd53aeedb90f7%2Fkaggle_riiid_3.png?generation=1610253573250499&amp;alt=media\" alt=\"\"></p>\n<p><strong>This feature increases by about 1.5k.</strong></p>",
  "messages": [
    {
      "id": 1146815,
      "postDate": "2021-01-10T04:42:24.730Z",
      "content": "<p>There has been a lot of discussion on <code>container_id</code>, and <a href=\"https://www.kaggle.com/c/riiid-test-answer-prediction/discussion/189465\" target=\"_blank\">this discussion</a> points out the problem on inconsistency between <code>timestamp</code> and <code>task_container_id</code>, as shown in below picture.<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2293617%2Fd37d94623f3bf00934f2479af90f8040%2Fkaggle_riiid_1.png?generation=1610252567534467&amp;alt=media\" alt=\"Figure 1.\"></p>\n<p>According to answer by Kaggle staff in other <a href=\"https://www.kaggle.com/c/riiid-test-answer-prediction/discussion/189351#1041405\" target=\"_blank\">discussion</a>, the <code>timestamp</code> column shows when an activity is finished, not when it started. The <code>task_container_id</code> comes from a scenario where the user gets a batch of questions each time they do a task, and the <code>task_container_id</code> represents the number of batch starting from 0 and increasing, so the <code>task_container_id</code>  reflects the order in which the user starts the task. If users work on one batch of questions and then the next batch of questions, then the <code>task_container_id</code> should increase with <code>timestamp</code>. Below picture shows this scenario where one batch of questions is completed and then the next batch is completed (the number in the box represents <code>task_container_id</code>).</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2293617%2F084ad07947075ae2e35f0bb814dd1a1e%2Fkaggle_riiid_2.png?generation=1610253099661857&amp;alt=media\" alt=\"\"></p>\n<p>But when we were in school, our teachers should have taught us that if we don't know how to answer a question , we should skip it first and do it later. This is the reason for the discontinuous of <code>task_container_id</code>. For example, in below picture, the user doesn't know how to do the questions with <code>task_container_id</code> of 1, so answer the questions with <code>task_container_id</code> of 2 first. Questions with <code>task_container_id</code> of 2 are easy to answer, and then go back to the questions with <code>task_container_id</code> of 1. Thus, the <code>task_container_id</code> does not automatically increment with <code>timestamp</code>. From this phenomenon we can construct a strong feature: the difference between the <code>task_container_id</code> of the current batch and that of the previous batch. The greater the absolute value of the difference, the more the user skip in current question. </p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2293617%2Fcc3c2fa6d6f24b0d62abd53aeedb90f7%2Fkaggle_riiid_3.png?generation=1610253573250499&amp;alt=media\" alt=\"\"></p>\n<p><strong>This feature increases by about 1.5k.</strong></p>",
      "rawMarkdown": "There has been a lot of discussion on `container_id`, and [this discussion](https://www.kaggle.com/c/riiid-test-answer-prediction/discussion/189465) points out the problem on inconsistency between `timestamp` and `task_container_id`, as shown in below picture.\n![Figure 1.](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2293617%2Fd37d94623f3bf00934f2479af90f8040%2Fkaggle_riiid_1.png?generation=1610252567534467&alt=media)\n\nAccording to answer by Kaggle staff in other [discussion](https://www.kaggle.com/c/riiid-test-answer-prediction/discussion/189351#1041405), the `timestamp` column shows when an activity is finished, not when it started. The `task_container_id` comes from a scenario where the user gets a batch of questions each time they do a task, and the `task_container_id` represents the number of batch starting from 0 and increasing, so the `task_container_id`  reflects the order in which the user starts the task. If users work on one batch of questions and then the next batch of questions, then the `task_container_id` should increase with `timestamp`. Below picture shows this scenario where one batch of questions is completed and then the next batch is completed (the number in the box represents `task_container_id`).\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2293617%2F084ad07947075ae2e35f0bb814dd1a1e%2Fkaggle_riiid_2.png?generation=1610253099661857&alt=media)\n\nBut when we were in school, our teachers should have taught us that if we don't know how to answer a question , we should skip it first and do it later. This is the reason for the discontinuous of `task_container_id`. For example, in below picture, the user doesn't know how to do the questions with `task_container_id` of 1, so answer the questions with `task_container_id` of 2 first. Questions with `task_container_id` of 2 are easy to answer, and then go back to the questions with `task_container_id` of 1. Thus, the `task_container_id` does not automatically increment with `timestamp`. From this phenomenon we can construct a strong feature: the difference between the `task_container_id` of the current batch and that of the previous batch. The greater the absolute value of the difference, the more the user skip in current question. \n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2293617%2Fcc3c2fa6d6f24b0d62abd53aeedb90f7%2Fkaggle_riiid_3.png?generation=1610253573250499&alt=media)\n\n**This feature increases by about 1.5k.**",
      "votes": 8
    }
  ],
  "comments": [],
  "raw_markdown_by_id": {
    "1146815": "There has been a lot of discussion on `container_id`, and [this discussion](https://www.kaggle.com/c/riiid-test-answer-prediction/discussion/189465) points out the problem on inconsistency between `timestamp` and `task_container_id`, as shown in below picture.\n![Figure 1.](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2293617%2Fd37d94623f3bf00934f2479af90f8040%2Fkaggle_riiid_1.png?generation=1610252567534467&alt=media)\n\nAccording to answer by Kaggle staff in other [discussion](https://www.kaggle.com/c/riiid-test-answer-prediction/discussion/189351#1041405), the `timestamp` column shows when an activity is finished, not when it started. The `task_container_id` comes from a scenario where the user gets a batch of questions each time they do a task, and the `task_container_id` represents the number of batch starting from 0 and increasing, so the `task_container_id`  reflects the order in which the user starts the task. If users work on one batch of questions and then the next batch of questions, then the `task_container_id` should increase with `timestamp`. Below picture shows this scenario where one batch of questions is completed and then the next batch is completed (the number in the box represents `task_container_id`).\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2293617%2F084ad07947075ae2e35f0bb814dd1a1e%2Fkaggle_riiid_2.png?generation=1610253099661857&alt=media)\n\nBut when we were in school, our teachers should have taught us that if we don't know how to answer a question , we should skip it first and do it later. This is the reason for the discontinuous of `task_container_id`. For example, in below picture, the user doesn't know how to do the questions with `task_container_id` of 1, so answer the questions with `task_container_id` of 2 first. Questions with `task_container_id` of 2 are easy to answer, and then go back to the questions with `task_container_id` of 1. Thus, the `task_container_id` does not automatically increment with `timestamp`. From this phenomenon we can construct a strong feature: the difference between the `task_container_id` of the current batch and that of the previous batch. The greater the absolute value of the difference, the more the user skip in current question. \n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2293617%2Fcc3c2fa6d6f24b0d62abd53aeedb90f7%2Fkaggle_riiid_3.png?generation=1610253573250499&alt=media)\n\n**This feature increases by about 1.5k.**"
  }
}