# Learning rate in logistic regression with sklearn

In sklearn, for logistic regression, you can define the penalty, the regularization rate and other variables. Is there a way to set the learning rate?

sklearn.linear_model.LogisticRegression doesn't use SGD, so there's no learning rate.

I think sklearn.linear_model.SGDClassifier is what you need, which is a linear classifier with SGD training.

## References

http://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html

http://scikit-learn.org/stable/modules/generated/sklearn.linear_model.SGDClassifier.html

• Thank you for the links and answers. So, how is LogisticRegression implemented in sklearn? I am not sure I fully understand what is the coordinate descent they use for it. – user Feb 5 '17 at 19:09

According to sklearn's Logistic source code, the solver used to minimize the loss function is the SAG solver (Stochastic Average Gradient). This paper defines this method, and in this link there is the implementation of the sag solver. This implementation of the solver uses a method to obtain the step size (learning rate), so there is not a way that you can change the learning rate (unless you want to change the source code).