Partial solution to multi-class logistic regression