This code was released for our paper "Detecting Changes of Student Behavior from Clickstream Data" at LAK 17
Jihyun Park ([email protected])
March 2017
Written in python2.7.
Python packages numpy, matplotlib, statsmodels are needed.
This is the main file for student change detection.
It loads a matrix with size (n_students X n_days) in csv format and runs the changepoint detection.
Take a look the main function at the bottom for an example run (or you can just run this file).
- Class
StudentChangepoint
detected_cp_arr: detected changepoint locations
mcp_max_ll_mat,m0_ll_mat: LogLik values for model w/ cp and model w/o cp
mcp_min_bic_mat,m0_bic_mat: BIC values for model w/ cp and model w/o cp
alpha_i_mat: Three column matrix for alpha_i's.[alpha_i1, alpha_i2, alpha_i0]
better_w_cp_sidxs: Student indices with detected change
better_wo_cp_sidxs: Student indices without detected change
Generalized linear regression using a simple gradient descent method (that only works for our model).
This code is used for the Bernoulli model only. (statsmodels package is used for the Poisson model.)
Some useful functions that are being used.