我正在使用gridsearchcv来训练逻辑回归分类器。我想知道的是,refit命令是否基于选择的超参数C重新选择特征,还是仅使用在交叉验证过程中选择的特征,而仅重新拟合系数的值而无需重新选择特征? / p>
答案 0 :(得分:0)
根据GridSearchCV
的文档:
1. Refit an estimator using the best found parameters on the whole dataset.
2. The refitted estimator is made available at the best_estimator_ attribute and permits using predict directly on this GridSearchCV instance.
从这里Confused with repect to working of GridSearchCV,您可以了解到refit
参数的重要性。
refit : boolean
Refit the best estimator with the entire dataset.
If “False”, it is impossible to make predictions using
this GridSearchCV instance after fitting.