scikit-learn 适合剩余时间 [英] scikit-learn fit remaining time
本文介绍了scikit-learn 适合剩余时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有办法在拟合模型时估计剩余时间?例如
Is there a way to estimate the remaining time when fitting a model? For example
model = sk.ensemble.RandomForestRegressor(n_estimators=10)
model.fit(x, y)
我有一个相当大的数据集(数百万行),这将需要一些时间,所以我想知道估计时间,以便我可以做其他事情并在过程完成后返回.
I have a quite large dataset (millions of rows), this is going to take some time so I would like to know estimated time so I can do other thigngs and get back when the process is finished.
对于像随机森林这样的集合,剩余时间的估计应该 [合理地] 容易.
With ensembles like random forest estimation of remaining time should be [reasonably] easy.
推荐答案
尝试 verbose
选项.您可以将其更改为 0(无输出)、1(每个作业的更新)和 2(每个树的更新),例如
Try verbose
option. You can change it from 0 (no output), 1 (update for each job), and 2 (update for each tree), e.g.
model = RandomForestRegressor(n_estimators=100, verbose=2, n_jobs=2).fit(X_train, y_train)
这篇关于scikit-learn 适合剩余时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文