1.sklearn AttributeError: ‘str‘ object has no attribute ‘decode‘

LogisticRegression 报错 AttributeError: ‘str’ object has no attribute ‘decode’

stackoverflow解答
解决办法将求解器指定为liblinear:
logreg = LogisticRegression(solver='liblinear', class_weight="balanced")

猜你喜欢

转载自blog.csdn.net/weixin_39754630/article/details/116521193