fix a bug: inplace np.rank(A) with np.linalg.matrix_rank(A).\n set predict_flag not to check_wgt in prediction case.