Search code examples
pythonlogistic-regression

alpha in sklearn LogisticRegression python


What is the default alpha in sklearn LogisticRegression with l1 penalty?

lmMod = LogisticRegression(penalty='l1')

Solution

  • According to the documentation,

    The parameter used for the the regularization is the parameter C in the input of the call. I represents the inverse of regularization strength. The default value is equal to 1.

    C : float, default: 1.0 Inverse of regularization strength; must be a positive float. Like in support vector machines, smaller values specify stronger regularization.