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

API changes for v2 #32

Open
SimonBlanke opened this issue Nov 6, 2022 · 1 comment
Open

API changes for v2 #32

SimonBlanke opened this issue Nov 6, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed
Milestone

Comments

@SimonBlanke
Copy link
Owner

In this issue the progress for the API-changes for v2 is shown.

The objective-function parameter might make more sense in the optimizer-class instead of the search-method. Parameters in the method should be data you would want to change from one search to the next. It does not make sense to me to change the objective-function but not the search-space. So the new API-design would look like this:

import numpy as np
from gradient_free_optimizers import RandomSearchOptimizer

def parabola_function(para):
    loss = para["x"] * para["x"]
    return -loss

search_space = {"x": np.arange(-10, 10, 0.1)}

opt = RandomSearchOptimizer(parabola_function, search_space)
opt.search(n_iter=100000)
@SimonBlanke SimonBlanke added enhancement New feature or request help wanted Extra attention is needed labels Nov 6, 2022
@SimonBlanke SimonBlanke added this to the v2.0 milestone Nov 6, 2022
@SimonBlanke SimonBlanke self-assigned this Nov 6, 2022
@SimonBlanke
Copy link
Owner Author

since there are multiple kinds of "powell's methods", the existing "powell's method" in GFO will be renames to "Powell's Conjugate Direction Method" in v2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant