pydaxing / Deep-Knowledge-Tracing-DKT-Pytorch

73 stars 16 forks source link

couple questions on implementation #2

Open Chunpai opened 3 years ago

Chunpai commented 3 years ago

Hi @chsong513 ,

I check your code, and I find two things confusing me.

  1. when you build the one-hot encoding of input. It seems you did not shift the question id by 1. The reason is to avoid conflict with padding 0s. If a student answer incorrectly for question 0, the one-hot encoding is same as all padded 0s' data. I did not observe this in your code, maybe you did it somewhere but I miss it.
  2. when you evaluate the model performance, it seems you did not mask the padded 0s. Am I correct ?

Thank you for your implementation on this model. It helps me a lot.

Best, Chunpai

ghost commented 3 years ago
font{
    line-height: 1.6;
}
ul,ol{
    padding-left: 20px;
    list-style-position: inside;
}

Thanks for your questions.1. Yes, if the learning sequence is not long enough, we pad 0. Therefore, the one-hot of the 0-th question is all padded 0 data. That’s what I do in the code.2. When I evaluate the model, all the padded data are masked, I wrote a part of the code to implement it.I'm sorry to have confused you since the code is not clear.

                            songcmic

                                songcmic@outlook.com

    签名由
    网易邮箱大师
    定制

On 10/23/2020 09:36,Chunpai<notifications@github.com> wrote: 

Hi @chsong513 , I check your code, and I find two things confusing me.

when you build the one-hot encoding of input. It seems you did not shift the question id by 1. The reason is to avoid conflict with padding 0s. If a student answer incorrectly for question 0, the one-hot encoding is same as all padded 0s' data. I did not observe this in your code, maybe you did it somewhere but I miss it. when you evaluate the model performance, it seems you did not mask the padded 0s. Am I correct ?

Thank you for your implementation on this model. It helps me a lot. Best, Chunpai

—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or unsubscribe.

Chunpai commented 3 years ago

Thanks @chsong513 . Do you mind pointing out which part of code is doing the masking ? Thanks.

ghost commented 3 years ago
font{
    line-height: 1.6;
}
ul,ol{
    padding-left: 20px;
    list-style-position: inside;
}

In the code in the  attached picture, we set a condition:p > 0. The corresponding output of all padded 0 data is 0, since all the elements are 0. Therefore, p > 0 filters out the padded data directly.

                            songcmic

                                songcmic@outlook.com

    签名由
    网易邮箱大师
    定制

On 10/26/2020 13:58,Chunpai<notifications@github.com> wrote: 

Thanks @chsong513 . Do you mind pointing out which part of code is doing the masking ? Thanks.

—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or unsubscribe.

Chunpai commented 3 years ago

Thank you very much @chsong513 . It makes sense now.