-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GeneticSearchCV #721
Comments
While I appreciate the motivation, it is not clear to me that a genetic algorithm is immune to local optima, in which case it might still be outperformed by a random search. I am not wholly closed to the idea of a genetic search, but there are a lot of ways to go about this. Suppose that we have two candiates and that the chromosomes represent the hyperparameters ... how would you go about combining different string settings? |
@koaning absolutely, it's not immune to local optima, I meant to say that it should to spend more time near local optima than a random search, which will sample more or less homogeneously, thus (theoretically...) using compute resources more efficiently. Of course it's not a magic bullet and, on average, won't outperform Random Search (I don't think anything does, really), I just thought it'd be a cool option to have. Regarding the methodology itself, my idea is to represent each hyperparameter as a gene, and a particular combination as a chromosome. As you say, string hyperparameters need some consideration; off the top of my head I can think of three alternatives:
I've used the combination approach for some optimization problems and it has worked well enough without introducing too much complexity, but am open to other possibilities. |
Is there a reason not to use this library? https://github.com/rsteca/sklearn-deap Kind of feel like it has been implemented elsewhere already. |
In my (and this can be only my) experience, both sklearn-deap and sklearn-genetic work well enough, but tend not to be worth the dependency hell that having deap as a dependency implies (though again, it might be my experience alone). My idea was to have a python-pure, albeit simpler GA optimization object. |
A hyperparameter optimization object that uses a genetic algorithm under the hood, with the same interface as
GridSearchCV
andRandomizedSearchCV
.The text was updated successfully, but these errors were encountered: