0
$\begingroup$

I am trying incorporate a formal strategy to find the most optimal set hyper-parameters for a machine learning algorithm. I understand you can either do a grid-search or a k-fold cross validation, among many other possible search options.

I came across scikit-learn's grid-search and cross-validated estimators in here. It says by default, the GridSearchCV uses a 3-fold cross-validation. Seems to me they are combining grid-search and cross-validation together. Does it mean the k-fold validation is done on each grid-search combination? If so, what is the advantage of that? Is it for more stable estimator? And is this combined grid-search and k-fold CV almost always better than just grid-search only or just k-fold CV only in finding the optimal hyper-parameters?

$\endgroup$
0
$\begingroup$
  1. GridSearch or random search concern how you search the hyper-parameter space for hyper-parameter configurations.
  2. k-fold CV, hold out method and so on are approaches for estimation of out of sample performance.

You need to apply both for model selection (gridsearch and k-fold CV are a good choice). :-)

$\endgroup$
  • 1
    $\begingroup$ Or, bayesian HPO instead of grid when the grid is large. $\endgroup$ – gunes Aug 31 '19 at 6:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.