Skip to content
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

Fix GWO #157

Merged
merged 14 commits into from
Oct 8, 2024
Merged

Fix GWO #157

merged 14 commits into from
Oct 8, 2024

Conversation

k-onoue
Copy link
Contributor

@k-onoue k-onoue commented Sep 27, 2024

Contributor Agreements

Please read the contributor agreements and if you agree, please click the checkbox below.

  • I agree to the contributor agreements.

Tip

Please follow the Quick TODO list to smoothly merge your PR.

Motivation

Description of the changes

TODO List towards PR Merge

Please remove this section if this PR is not an addition of a new package.
Otherwise, please check the following TODO list:

  • Copy ./template/ to create your package
  • Replace <COPYRIGHT HOLDER> in LICENSE of your package with your name
  • Fill out README.md in your package
  • Add import statements of your function or class names to be used in __init__.py
  • Apply the formatter based on the tips in README.md
  • Check whether your module works as intended based on the tips in README.md

@k-onoue
Copy link
Contributor Author

k-onoue commented Sep 27, 2024

Apologies for the delay in making modifications despite receiving clear and helpful comments on the previous implementation.

I’ve addressed all the points mentioned in this PR, but I still have a few uncertainties.

One major point of concern is how to update the value of a, which serves as a decaying factor to balance exploration and exploitation. Initially, I treated a as linearly decreasing from 2 to 0 based on the number of trials, as follows:

# Linearly decrease from 2 to 0
a = 2 * (1 - len(study.trials) / (self.max_iter * self.population_size))

It was suggested that a should be updated on an iteration-by-iteration basis. However, after reviewing both the paper and the author-provided MATLAB implementation, I believe that the "Max number of iterations" in them corresponds to n_trials in Optuna. That said, I’m still not entirely confident, so any corrections or further suggestions would be appreciated.

Additionally, I’m unsure of the exact types of input variables that are allowed for this sampler, so I’ve currently omitted support for categorical distributions in _lazy_init method.

@HideakiImamura
Copy link
Member

@eukaryo Could you review this PR?

Copy link
Contributor

@eukaryo eukaryo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Sorry for my late reply.

@eukaryo eukaryo merged commit 83871a9 into optuna:main Oct 8, 2024
4 checks passed
@k-onoue k-onoue deleted the fix-gwo branch October 8, 2024 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants