sklearn LogisticRegression without regularization

前端 未结 3 2096
Happy的楠姐
Happy的楠姐 2021-02-05 06:49

Logistic regression class in sklearn comes with L1 and L2 regularization. How can I turn off regularization to get the \"raw\" logistic fit such as in glmfit in Matlab? I think

3条回答
  •  执念已碎
    2021-02-05 07:11

    I got the same question and tried out the answer in addition to the other answers:

    If set C to a large value does not work for you, also set penalty='l1'.

提交回复
热议问题