Skip to content

Initial start point #63

Closed Answered by SimonBlanke
glitchyordis asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @glitchyordis,

yes this is possible via the "warm_start" key in the initialize-dictionary. Here is an example:

import numpy as np
from gradient_free_optimizers import HillClimbingOptimizer

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

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

init_para = {
    "x": 5,
}

initialize = {"warm_start": [init_para]}

opt = HillClimbingOptimizer(search_space, initialize=initialize)
opt.search(parabola_function, n_iter=50)

Here is the API ref for this feature:
https://simonblanke.github.io/gradient-free-optimizers-documentation/1.5/base_optimizer/#initialize
At the moment the docs miss an example for this. I will add…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by glitchyordis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants