Sklearn,GridSearch:如何在执行过程中打印出进度? [英] Sklearn, gridsearch: how to print out progress during the execution?

查看:1337
本文介绍了Sklearn,GridSearch:如何在执行过程中打印出进度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用sklearn中的GridSearch来优化分类器的参数.有大量数据,因此优化的整个过程需要一段时间:一天以上.我想在执行过程中观察已经尝试过的参数组合的性能.是否有可能?

I am using GridSearch from sklearn to optimize parameters of the classifier. There is a lot of data, so the whole process of optimization takes a while: more than a day. I would like to watch the performance of the already-tried combinations of parameters during the execution. Is it possible?

推荐答案

GridSearchCV中的verbose参数设置为正数(数字越大,获得的细节越多).例如:

Set the verbose parameter in GridSearchCV to a positive number (the greater the number the more detail you will get). For instance:

GridSearchCV(clf, param_grid, cv=cv, scoring='accuracy', verbose=10)  

这篇关于Sklearn,GridSearch:如何在执行过程中打印出进度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆