pytorch-SAKT
pytorch-SAKT copied to clipboard
Input tuple
Hi Tian Could u help me understand how does dataset input is mapping to as mentioend in the SAKT Paper
def __getitem__(self, index):
student = self.students[index]
problems = student[1]
correct = student[2]
x = np.zeros(opt.max_len - 1)
x = problems[:-1]
# we assume max_skill_num + 1 = num_skills because skill index starts from 0 to max_skill_num
x += (correct[:-1] == 1) * (self.max_skill_num + 1)
problems = problems[1:]
correct = correct[1:]
return x, problems, correct
tuple xt = (et, rt) is presented to the model as a number
yt = et + rt × E, where E is the total number of exercises.
Thus, the total values that an element in the interaction
sequence can take is 2E, while elements in the exercise sequence can take E possible values.
paper susgests that we are passing input as single which is equation yt=et+rt*E but you are passing yt as well as rt separately
x += (correct[:-1] == 1) * (self.max_skill_num + 1)
, x means yt, and correct means rt, the equation means if the element in correct is 1 then plus et with E, otherwise do nothing, as said in the paper. The rt is still needed when computing loss in equation (7) in the paper, so the dataset returns rt. But the rt should not be passed to the student_model's forward function, which I forgot to modify in the run.py
, thanks for your information.
there are some more confusions i have a) paper below says to pass exercise seq with one position ahead and same goes for the responses r
It is convenient to consider the model with inputs
x1, x2, . . . , xt−1 and the exercise sequence with one position
ahead, e2, e3, . . . , et and the output being the correctness
of the response to exercises r2, r3, . . . , rt. The interaction
tuple xt = (et, rt) is presented to the model as a number
yt = et + rt × E, where E is the total number of exercises.
Thus, the total values that an element in the interaction
sequence can take is 2E, while elements in the exercise sequence can take E possible values.
is it like this paper says three inputs
- x1,x2... t-1 which is expressed as yt
- e(t+1)
- r(t+1)
b) For train data we can find the correctness of the responses but for Test data how do we pass x1....t-1 in terms of yt as we dont know correctness
c) Isnt model trying to learn more the sequence of questions and its similarity with past exercises ... which can potentially be anamolous at times.
d) What is difference between Excercise seq and Interaction seq. if i understand it correctly , Excercise seq could list of Unique Questions or Problems, While the other is just event when Excercise was attempted which may be multiple times depending upon learning platform flashing that to user .