-
Notifications
You must be signed in to change notification settings - Fork 33
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
Add the implementation of Differential Evolution #199
Conversation
added explanations
for Checks/checks: package/samplers/differential_evolution/example.py:182:9: F841 Local variable The variable z is just a dummy variable used to test whether the sampler works for dynamic search space. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Contributor Agreements
Please read the contributor agreements and if you agree, please click the checkbox below.
Motivation
This PR introduces the
DESampler
, which implements a hybrid Differential Evolution (DE) and Random Sampling algorithm for hyperparameter optimization.Differential Evolution is a well-established optimization algorithm known for its robustness and performance across numerical optimization tasks. By integrating Random Sampling for categorical parameters, this implementation bridges the gap between numerical and categorical hyperparameter spaces, making it suitable for real-world machine learning and AI applications where mixed-type parameters are common.
The implementation is particularly motivated by the need to handle dynamic search spaces efficiently, enabling flexible adaptation to changing parameter dimensions during optimization. This makes the
DESampler
well-suited for tasks involving complex search spaces, such as neural architecture search or expensive optimization tasks with evolving requirements.For simplicity, this implementation provides a default setup of Differential Evolution, with automatic population size determination and seamless integration with Optuna’s framework for tracking trials and results. The sampler ensures computational efficiency while maintaining high diversity in the population, enabling faster convergence to optimal solutions.
Description of the changes
DESampler
inde.py
DESampler
inexample.py
TODO List towards PR Merge
./template/
to create your package<COPYRIGHT HOLDER>
inLICENSE
of your package with your nameREADME.md
in your package__init__.py
from __future__ import annotations
at the head of any Python files that include typing to support older Python versionsREADME.md
README.md