Closed zzzz-zzzz closed 2 years ago
The details about how these files are generated can be found in session V.A of the paper Structure-based Knowledge Tracing: An Influence Propagation View
when I use script python MSKT.py train skt a0910 1
It will download dataset to data/assistment_2009_2010
assistment_2009_2010
contains
I was figuring out how was correct_transition_graph.json
generated
The key code of graph generating is from pip package EduData
D:\anaconda3\envs\XKT\Lib\sitepackages\EduData\Task\KnowledgeTracing\graph.py
def correct_transition_graph(ku_num, *src, tar=None, input_is_file=True, diagonal_value=0.):
"""
When a concept is mastered, how much probability is it to be transferred to another concept.
For example,
[[0, 1], [1, 0], [1, 1], [2, 1]]
[[2, 0], [1, 0], [0, 1], [2, 1]]
```
When concept #0 is mastered (i.e., 1st in seq #1, 3rd in seq #2),
only concept # 2 can be mastered (4th in seq #2).
Thus, the transition probabilty for concept #0 is [0, 0, 1],
which mastering concept #0 can influence mastering concept #2 more thant concept #1.
Parameters
----------
ku_num
src
tar
input_is_file
diagonal_value
Returns
-------
Examples
-------
>>> _seq = [[[0, 1], [1, 0], [1, 1], [2, 1]], [[2, 0], [1, 0], [0, 1], [2, 1]]]
>>> correct_transition_graph(3, _seq, input_is_file=False)
[[0.0, 0.0, 1.0], [0.0, 0.0, 1.0], [0.0, 0.0, 0.0]]
>>> _seq = [[[0, 1], [1, 1], [1, 1], [2, 1]]]
>>> correct_transition_graph(3, _seq, input_is_file=False)
[[0.0, 1.0, 0.0], [0.0, 0.0, 1.0], [0.0, 0.0, 0.0]]
"""
count_graph = correct_transition_count_graph(ku_num, *src, tar=None, input_is_file=input_is_file)
_transition_graph = _row_normalize(count_graph, diagonal_value, skip_zero_row=True)
if tar is not None:
_output_graph(_transition_graph, tar)
return _transition_graph
the parameter I use is
ku_num = 124 res = correct_transition_graph(ku_num, 'train.json', input_is_file=True) print('correct_transition_graph[0]', res[0])
but the result is different from given `data/assistment_2009_2010/correct_transition_graph.json`
Our graph is obtained based on train, valid and test
I change the parameter to
res = correct_transition_graph(ku_num, 'train.json', 'test.json', 'valid.json', input_is_file=True)
the result is still different
How was the graph data trained and obtained? http://base.ustc.edu.cn/data/ktbd/assistment_2009_2010/ _correct_transitiongraph.json _ctranssim.json