{
  "id": 394325,
  "title": "Using Previous Answers?",
  "url": "/competitions/predict-student-performance-from-game-play/discussion/394325",
  "author_name": "",
  "post_date": "2023-03-13T04:56:00.746465900Z",
  "votes": 2,
  "comment_count": 13,
  "views": 0,
  "content": "<p>Hi, everyone, I have a question about using the previous answer.<br>\nAs we know, each user has to answer from question level 1 to level 18, and he can not answer the question afterward if he did not solve the previous one. <br>\nHere comes the assumption that the performance of the user could be inferred from his or her previous answers. There are mainly two methods for prediction:</p>\n<ol>\n<li>Divide those questions into three groups 0-4, 5-12, and 13-22, when predicting the second group 5-12, add the predicted result of 0-4 for training, when predicting 13-22, add the predicted result 0-4 and 5-12.</li>\n<li>Add all the information from the previous questions. for example, when predicting level 2, add the result of level 1, when predicting level 5, add the result of 1,2,3, and 4.<br>\nI m wondering which method is better, and how to write the INFERENCE code.<br>\nSome discussion says it did not improve their CV score, any reason for that?</li>\n</ol>",
  "messages": [
    {
      "id": "2179344",
      "postDate": "03/13/2023 04:56:00",
      "content": "<p>Hi, everyone, I have a question about using the previous answer.<br>\nAs we know, each user has to answer from question level 1 to level 18, and he can not answer the question afterward if he did not solve the previous one. <br>\nHere comes the assumption that the performance of the user could be inferred from his or her previous answers. There are mainly two methods for prediction:</p>\n<ol>\n<li>Divide those questions into three groups 0-4, 5-12, and 13-22, when predicting the second group 5-12, add the predicted result of 0-4 for training, when predicting 13-22, add the predicted result 0-4 and 5-12.</li>\n<li>Add all the information from the previous questions. for example, when predicting level 2, add the result of level 1, when predicting level 5, add the result of 1,2,3, and 4.<br>\nI m wondering which method is better, and how to write the INFERENCE code.<br>\nSome discussion says it did not improve their CV score, any reason for that?</li>\n</ol>",
      "rawMarkdown": "Hi, everyone, I have a question about using the previous answer.\nAs we know, each user has to answer from question level 1 to level 18, and he can not answer the question afterward if he did not solve the previous one. \nHere comes the assumption that the performance of the user could be inferred from his or her previous answers. There are mainly two methods for prediction:\n1. Divide those questions into three groups 0-4, 5-12, and 13-22, when predicting the second group 5-12, add the predicted result of 0-4 for training, when predicting 13-22, add the predicted result 0-4 and 5-12.\n2. Add all the information from the previous questions. for example, when predicting level 2, add the result of level 1, when predicting level 5, add the result of 1,2,3, and 4.\nI m wondering which method is better, and how to write the INFERENCE code.\nSome discussion says it did not improve their CV score, any reason for that?",
      "votes": null
    },
    {
      "id": "2179391",
      "postDate": "03/13/2023 06:30:59",
      "content": "<p>Both improved my cv but decreased my lb (maybe i did something wrong , I haven’t checked yet!)</p>",
      "rawMarkdown": "Both improved my cv but decreased my lb (maybe i did something wrong , I haven’t checked yet!)",
      "votes": null
    },
    {
      "id": "2179543",
      "postDate": "03/13/2023 08:52:10",
      "content": "<p>Hi, Reacher, may I ask you how many points you improved in your CV?<br>\nI got similar results by using the second methods. <br>\nMy cv improved a lot (0.004~0.006) but got little improve in lb (&lt; 0.001).</p>",
      "rawMarkdown": "Hi, Reacher, may I ask you how many points you improved in your CV?\nI got similar results by using the second methods. \nMy cv improved a lot (0.004~0.006) but got little improve in lb (< 0.001).",
      "votes": null
    },
    {
      "id": "2179632",
      "postDate": "03/13/2023 09:48:12",
      "content": "<p>It seems that the test data is not in order, after commin three data of level 5, it then goes up to level 13, and I cannot predict based on the result of level 6-12!</p>",
      "rawMarkdown": "It seems that the test data is not in order, after commin three data of level 5, it then goes up to level 13, and I cannot predict based on the result of level 6-12!",
      "votes": null
    },
    {
      "id": "2179699",
      "postDate": "03/13/2023 10:35:49",
      "content": "<p>Sorry I did it early in the competition and i don't remember .I will reimplement it and see what it gives.</p>",
      "rawMarkdown": "Sorry I did it early in the competition and i don't remember .I will reimplement it and see what it gives.",
      "votes": null
    },
    {
      "id": "2180452",
      "postDate": "03/13/2023 20:16:36",
      "content": "<p>Using predictions from previous level groups boosted my CV and LB scores by about +0.001, I've got the second method running on LB right now but on CV it increased by about +0.003</p>\n<p>I've written a notebook that demonstrates both methods - hope that helps!<br>\n<a href=\"https://www.kaggle.com/code/judehunt23/saving-predictions-from-previous-levels-2-ways\" target=\"_blank\">https://www.kaggle.com/code/judehunt23/saving-predictions-from-previous-levels-2-ways</a></p>",
      "rawMarkdown": "Using predictions from previous level groups boosted my CV and LB scores by about +0.001, I've got the second method running on LB right now but on CV it increased by about +0.003\n\nI've written a notebook that demonstrates both methods - hope that helps!\nhttps://www.kaggle.com/code/judehunt23/saving-predictions-from-previous-levels-2-ways",
      "votes": null
    },
    {
      "id": "2180636",
      "postDate": "03/14/2023 02:01:00",
      "content": "<p>Hi Jude, your code is so helpful to me and I learned a lot! </p>",
      "rawMarkdown": "Hi Jude, your code is so helpful to me and I learned a lot!",
      "votes": null
    },
    {
      "id": "2180638",
      "postDate": "03/14/2023 02:04:11",
      "content": "<p>Just to clear up my confusion: After reading the code of <a href=\"https://www.kaggle.com/judehunt23\" target=\"_blank\">@judehunt23</a>  I understood that the data is in order. It first feeds you a session, with the questions from level 1 to 3, and then it feeds you another session, level 1 to 3， after completing all the sessions and all the questions of level group 1-3, then it feeds you questions from 4-12, finally, it feeds you question 13-22. </p>",
      "rawMarkdown": "Just to clear up my confusion: After reading the code of @judehunt23  I understood that the data is in order. It first feeds you a session, with the questions from level 1 to 3, and then it feeds you another session, level 1 to 3， after completing all the sessions and all the questions of level group 1-3, then it feeds you questions from 4-12, finally, it feeds you question 13-22.",
      "votes": null
    },
    {
      "id": "2180640",
      "postDate": "03/14/2023 02:07:20",
      "content": "<p>And I think that the previous version of API is incorrect because it gives you a session, with levels 1-18, and then gives you the next session. This makes you infer the present result of session B based on the future of session A, and this is not relevant. </p>",
      "rawMarkdown": "And I think that the previous version of API is incorrect because it gives you a session, with levels 1-18, and then gives you the next session. This makes you infer the present result of session B based on the future of session A, and this is not relevant.",
      "votes": null
    },
    {
      "id": "2181196",
      "postDate": "03/14/2023 11:37:47",
      "content": "<p>I'm glad you found it useful <a href=\"https://www.kaggle.com/harrisonliang\" target=\"_blank\">@harrisonliang</a>!</p>",
      "rawMarkdown": "I'm glad you found it useful @harrisonliang!",
      "votes": null
    },
    {
      "id": "2183942",
      "postDate": "03/16/2023 03:51:14",
      "content": "<p>Hi, danniel, I got the same result. Have you found what caused this situation?</p>",
      "rawMarkdown": "Hi, danniel, I got the same result. Have you found what caused this situation?",
      "votes": null
    },
    {
      "id": "2184643",
      "postDate": "03/16/2023 14:06:30",
      "content": "<p>Same as you.</p>\n<p>My cv imporved 0.002 but my lb decreased 0.001.</p>\n<p>Maybe it has some cv leak…</p>",
      "rawMarkdown": "Same as you.\n\nMy cv imporved 0.002 but my lb decreased 0.001.\n\nMaybe it has some cv leak...",
      "votes": null
    },
    {
      "id": "2185218",
      "postDate": "03/16/2023 22:11:38",
      "content": "<p>In my case, my CV improved by 0.002 and my LB slightly improved by less than 0.001. I don't know why. May I ask you how many feature you used in the model?</p>",
      "rawMarkdown": "In my case, my CV improved by 0.002 and my LB slightly improved by less than 0.001. I don't know why. May I ask you how many feature you used in the model?",
      "votes": null
    },
    {
      "id": "2187404",
      "postDate": "03/18/2023 17:38:49",
      "content": "<p>I tried both, and I even tried both together. The first method deteriorated the score a bit, the second helped a tiny bit, but scoring became very long as the data need to be saved for the next iterations. </p>",
      "rawMarkdown": "I tried both, and I even tried both together. The first method deteriorated the score a bit, the second helped a tiny bit, but scoring became very long as the data need to be saved for the next iterations.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2179391,
      "author_name": "ihebch",
      "author_url": "",
      "post_date": "03/13/2023 06:30:59",
      "content": "<p>Both improved my cv but decreased my lb (maybe i did something wrong , I haven’t checked yet!)</p>",
      "votes": null,
      "replies": [
        {
          "id": 2179543,
          "author_name": "dannielscut",
          "author_url": "",
          "post_date": "03/13/2023 08:52:10",
          "content": "<p>Hi, Reacher, may I ask you how many points you improved in your CV?<br>\nI got similar results by using the second methods. <br>\nMy cv improved a lot (0.004~0.006) but got little improve in lb (&lt; 0.001).</p>",
          "votes": null,
          "replies": [
            {
              "id": 2179699,
              "author_name": "ihebch",
              "author_url": "",
              "post_date": "03/13/2023 10:35:49",
              "content": "<p>Sorry I did it early in the competition and i don't remember .I will reimplement it and see what it gives.</p>",
              "votes": null,
              "replies": []
            },
            {
              "id": 2183942,
              "author_name": "yunqicao",
              "author_url": "",
              "post_date": "03/16/2023 03:51:14",
              "content": "<p>Hi, danniel, I got the same result. Have you found what caused this situation?</p>",
              "votes": null,
              "replies": []
            }
          ]
        },
        {
          "id": 2184643,
          "author_name": "clement1999",
          "author_url": "",
          "post_date": "03/16/2023 14:06:30",
          "content": "<p>Same as you.</p>\n<p>My cv imporved 0.002 but my lb decreased 0.001.</p>\n<p>Maybe it has some cv leak…</p>",
          "votes": null,
          "replies": [
            {
              "id": 2185218,
              "author_name": "harrisonliang",
              "author_url": "",
              "post_date": "03/16/2023 22:11:38",
              "content": "<p>In my case, my CV improved by 0.002 and my LB slightly improved by less than 0.001. I don't know why. May I ask you how many feature you used in the model?</p>",
              "votes": null,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 2179632,
      "author_name": "harrisonliang",
      "author_url": "",
      "post_date": "03/13/2023 09:48:12",
      "content": "<p>It seems that the test data is not in order, after commin three data of level 5, it then goes up to level 13, and I cannot predict based on the result of level 6-12!</p>",
      "votes": null,
      "replies": [
        {
          "id": 2180638,
          "author_name": "harrisonliang",
          "author_url": "",
          "post_date": "03/14/2023 02:04:11",
          "content": "<p>Just to clear up my confusion: After reading the code of <a href=\"https://www.kaggle.com/judehunt23\" target=\"_blank\">@judehunt23</a>  I understood that the data is in order. It first feeds you a session, with the questions from level 1 to 3, and then it feeds you another session, level 1 to 3， after completing all the sessions and all the questions of level group 1-3, then it feeds you questions from 4-12, finally, it feeds you question 13-22. </p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 2180640,
          "author_name": "harrisonliang",
          "author_url": "",
          "post_date": "03/14/2023 02:07:20",
          "content": "<p>And I think that the previous version of API is incorrect because it gives you a session, with levels 1-18, and then gives you the next session. This makes you infer the present result of session B based on the future of session A, and this is not relevant. </p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 2180452,
      "author_name": "judehunt23",
      "author_url": "",
      "post_date": "03/13/2023 20:16:36",
      "content": "<p>Using predictions from previous level groups boosted my CV and LB scores by about +0.001, I've got the second method running on LB right now but on CV it increased by about +0.003</p>\n<p>I've written a notebook that demonstrates both methods - hope that helps!<br>\n<a href=\"https://www.kaggle.com/code/judehunt23/saving-predictions-from-previous-levels-2-ways\" target=\"_blank\">https://www.kaggle.com/code/judehunt23/saving-predictions-from-previous-levels-2-ways</a></p>",
      "votes": null,
      "replies": [
        {
          "id": 2180636,
          "author_name": "harrisonliang",
          "author_url": "",
          "post_date": "03/14/2023 02:01:00",
          "content": "<p>Hi Jude, your code is so helpful to me and I learned a lot! </p>",
          "votes": null,
          "replies": [
            {
              "id": 2181196,
              "author_name": "judehunt23",
              "author_url": "",
              "post_date": "03/14/2023 11:37:47",
              "content": "<p>I'm glad you found it useful <a href=\"https://www.kaggle.com/harrisonliang\" target=\"_blank\">@harrisonliang</a>!</p>",
              "votes": null,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 2187404,
      "author_name": "gehallak",
      "author_url": "",
      "post_date": "03/18/2023 17:38:49",
      "content": "<p>I tried both, and I even tried both together. The first method deteriorated the score a bit, the second helped a tiny bit, but scoring became very long as the data need to be saved for the next iterations. </p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2179344": "Hi, everyone, I have a question about using the previous answer.\nAs we know, each user has to answer from question level 1 to level 18, and he can not answer the question afterward if he did not solve the previous one. \nHere comes the assumption that the performance of the user could be inferred from his or her previous answers. There are mainly two methods for prediction:\n1. Divide those questions into three groups 0-4, 5-12, and 13-22, when predicting the second group 5-12, add the predicted result of 0-4 for training, when predicting 13-22, add the predicted result 0-4 and 5-12.\n2. Add all the information from the previous questions. for example, when predicting level 2, add the result of level 1, when predicting level 5, add the result of 1,2,3, and 4.\nI m wondering which method is better, and how to write the INFERENCE code.\nSome discussion says it did not improve their CV score, any reason for that?",
    "2179391": "Both improved my cv but decreased my lb (maybe i did something wrong , I haven’t checked yet!)",
    "2179543": "Hi, Reacher, may I ask you how many points you improved in your CV?\nI got similar results by using the second methods. \nMy cv improved a lot (0.004~0.006) but got little improve in lb (< 0.001).",
    "2179632": "It seems that the test data is not in order, after commin three data of level 5, it then goes up to level 13, and I cannot predict based on the result of level 6-12!",
    "2179699": "Sorry I did it early in the competition and i don't remember .I will reimplement it and see what it gives.",
    "2180452": "Using predictions from previous level groups boosted my CV and LB scores by about +0.001, I've got the second method running on LB right now but on CV it increased by about +0.003\n\nI've written a notebook that demonstrates both methods - hope that helps!\nhttps://www.kaggle.com/code/judehunt23/saving-predictions-from-previous-levels-2-ways",
    "2180636": "Hi Jude, your code is so helpful to me and I learned a lot!",
    "2180638": "Just to clear up my confusion: After reading the code of @judehunt23  I understood that the data is in order. It first feeds you a session, with the questions from level 1 to 3, and then it feeds you another session, level 1 to 3， after completing all the sessions and all the questions of level group 1-3, then it feeds you questions from 4-12, finally, it feeds you question 13-22.",
    "2180640": "And I think that the previous version of API is incorrect because it gives you a session, with levels 1-18, and then gives you the next session. This makes you infer the present result of session B based on the future of session A, and this is not relevant.",
    "2181196": "I'm glad you found it useful @harrisonliang!",
    "2183942": "Hi, danniel, I got the same result. Have you found what caused this situation?",
    "2184643": "Same as you.\n\nMy cv imporved 0.002 but my lb decreased 0.001.\n\nMaybe it has some cv leak...",
    "2185218": "In my case, my CV improved by 0.002 and my LB slightly improved by less than 0.001. I don't know why. May I ask you how many feature you used in the model?",
    "2187404": "I tried both, and I even tried both together. The first method deteriorated the score a bit, the second helped a tiny bit, but scoring became very long as the data need to be saved for the next iterations."
  },
  "source": "meta"
}