logistic regression - class code