mirror of
https://github.com/ANL-CEEESA/LLEPE.git
synced 2025-12-06 09:58:52 -06:00
commented out skopt in optimizers
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import scipy.optimize as scipy_opt
|
||||
from scipy.optimize import minimize
|
||||
import skopt
|
||||
# import skopt
|
||||
|
||||
def dual_anneal_optimizer(objective, x_guess):
|
||||
bounds = [(1e-1, 1e1)] * len(x_guess)
|
||||
@@ -21,19 +21,19 @@ def diff_evo_optimizer(objective, x_guess):
|
||||
return est_parameters, res.fun
|
||||
|
||||
|
||||
def forest_lbfgsb_optimizer(objective, x_guess):
|
||||
x_guess = list(x_guess)
|
||||
bounds = [(1e-1, 1e1)]*len(x_guess)
|
||||
bounds[1] = (1e-1, 2)
|
||||
res = skopt.forest_minimize(objective,
|
||||
bounds,
|
||||
random_state=1,
|
||||
acq_func='LCB',
|
||||
n_random_starts=30,
|
||||
x0=x_guess,
|
||||
xi=1e-4)
|
||||
x_guess = res.x
|
||||
optimizer_kwargs = {"method": 'l-bfgs-b',
|
||||
"bounds": bounds}
|
||||
res = minimize(objective, x_guess, **optimizer_kwargs)
|
||||
return res.x, res.fun
|
||||
# def forest_lbfgsb_optimizer(objective, x_guess):
|
||||
# x_guess = list(x_guess)
|
||||
# bounds = [(1e-1, 1e1)]*len(x_guess)
|
||||
# bounds[1] = (1e-1, 2)
|
||||
# res = skopt.forest_minimize(objective,
|
||||
# bounds,
|
||||
# random_state=1,
|
||||
# acq_func='LCB',
|
||||
# n_random_starts=30,
|
||||
# x0=x_guess,
|
||||
# xi=1e-4)
|
||||
# x_guess = res.x
|
||||
# optimizer_kwargs = {"method": 'l-bfgs-b',
|
||||
# "bounds": bounds}
|
||||
# res = minimize(objective, x_guess, **optimizer_kwargs)
|
||||
# return res.x, res.fun
|
||||
|
||||
Reference in New Issue
Block a user