I am a little bit confused with the grid search interface from scikit-learn
. From examples I found snippets like that
clf = GridSearchCV(SVC(C=1), tuned_parameters, cv=5,
scoring='%s_weighted' % score)
clf.fit(X_train, y_train)
I imagine what when calling fit
the exhaustive search happens and then the estimator is being fitted with the best parameters that were found.
My question is, after I call fit
can I go on and call predict
or is my estimator considered overfit in this case? Should I create another estimator using the best parameters and then perform a cross_validation to see what it actually scores?