What's the difference between GridSearchCrossValidation score and score on testset?
I'm doing classification using python. I'm using the class GridSearchCV, this class has the attribute best_score_ defined as Mean cross-validated score of the best_estimator.
With this class i can also compute the score over the test set using score.
Now, I understand the theoretical difference between the two values(one is computed in the cross validation, the other is computed on the test set), but how should I interpret them? For example, if in case 1 I get these values (respectively as best_score_ and as score on the test set) 0.9236840458731027 0.8483477781024932
, and in case 2 these other values 0.8923046854943018 0.8733431353820776
, which one should I prefer and why? Why can the difference between the two values vary so much?
Topic grid-search gridsearchcv keras classification python
Category Data Science