stanbkt.utils.KCData#
- class stanbkt.utils.KCData(correctness, student_inter_dict, lengths, student_ids, problem_ids, groups=None, group_2_index=None)#
Bases:
objectStructured data container for a single knowledge component.
Stores preprocessed interaction data for a KC, including correctness matrix, student/problem identifiers, and optional group assignments.
- Variables:
correctness (np.ndarray) – Correctness matrix of shape (num_students, num_problems).
student_inter_dict (dict[str, StudentInteraction]) – Mapping of student IDs to their interaction sequences, used to preserve original problem IDs and interaction counts.
lengths (npt.NDArray[np.int32]) – Vector of interaction sequence lengths for each student.
student_ids (list[str]) – Student identifiers matching rows of correctness matrix.
problem_ids (list[str]) – Problem identifiers matching columns of correctness matrix.
groups (Optional[np.ndarray], default None) – Optional group array (e.g., student group assignments or problem difficulty groups).
group_2_index (Optional[dict[str, int]], default None) – Optional mapping from group ID to index in groups array.
- Parameters:
- correctness: ndarray#