A GridSearchCV object is fitted with refit=True. What does calling predict afterwards use?
Correct answer
D. The best estimator refitted on the full training set, not just the winning fold
15 views
D. The best estimator refitted on the full training set, not just the winning fold
15 views
Refitting: with refit=True, after the search finishes the best hyperparameters are used to fit one model on all training data, and that model becomes best_estimator_ and serves predict. With refit=False no final model is retained, because best_estimator_ is absent, so you must fit one yourself before predicting. Reporting the search's own score as a performance estimate is biased, because the same data selected the hyperparameters; nested cross-validation is the clean alternative.
Asked in: NTS, PPSC IT, Interviews
Not sure why the answer is D? Ask here and get an explanation.