Adjusted logistic regression gradient.