【发布时间】:2020-10-30 01:31:14
【问题描述】:
我正在尝试在 scikit learn 中训练一个逻辑回归模型,训练需要很长时间,大约 2 小时。数据集的大小为 21613 x 19。我是 scikit learn 的新手,因此我不知道我的代码是否错误,或者训练需要很长时间。非常感谢任何有关如何提高训练速度的建议!
用于训练的代码如下
# get the LogisticRegression estimator
from sklearn.linear_model import LogisticRegression
# training the model
# apply algorithm to data using fit()
clf = LogisticRegression(solver='newton-cg',multi_class='multinomial')
clf.fit(X_train,y_train)
【问题讨论】:
标签: python scikit-learn