Speeding up sklearn logistic regression

后端 未结 4 1041
眼角桃花
眼角桃花 2021-02-02 16:53

I have a model I\'m trying to build using LogisticRegression in sklearn that has a couple thousand features and approximately 60,000 samples. I\'m try

4条回答
  •  一整个雨季
    2021-02-02 17:15

    The default solver for LogisticRegressin in sklearn is liblinear which is a suitable solver for normal datasets. For large datasets try the stochastic gradient descent solvers such as sag:

    model = LogisticRegression(solver='sag')
    

提交回复
热议问题