Logistic regression for multiclass classification