fix weight_matrix, remove weight_matrix_sparse