ValueError: `f0` passed has more than 1 dimension.
jing-2020 opened this issue · 0 comments
algorithm=GPyOpt(max_num_trials=10)
INFO:GP:initializing Y
INFO:GP:initializing inference method
INFO:GP:adding kernel and likelihood as parameters
Traceback (most recent call last):
File "E:/my_python/瞎写/数据分析.py", line 23, in
for trial in study:
File "D:\program files(x86)\python\lib\site-packages\sherpa\core.py", line 376, in next
t = self.get_suggestion()
File "D:\program files(x86)\python\lib\site-packages\sherpa\core.py", line 215, in get_suggestion
self.lower_is_better)
File "D:\program files(x86)\python\lib\site-packages\sherpa\algorithms\bayesian_optimization.py", line 110, in get_suggestion
lower_is_better)
File "D:\program files(x86)\python\lib\site-packages\sherpa\algorithms\bayesian_optimization.py", line 149, in _generate_bayesopt_batch
return bo_step.suggest_next_locations()
File "D:\program files(x86)\python\lib\site-packages\GPyOpt\core\bo.py", line 69, in suggest_next_locations
suggested_locations = self._compute_next_evaluations(pending_zipped_X = pending_X, ignored_zipped_X = ignored_X)
File "D:\program files(x86)\python\lib\site-packages\GPyOpt\core\bo.py", line 236, in _compute_next_evaluations
return self.space.zip_inputs(self.evaluator.compute_batch(duplicate_manager=duplicate_manager, context_manager= self.acquisition.optimizer.context_manager))
File "D:\program files(x86)\python\lib\site-packages\GPyOpt\core\evaluators\batch_local_penalization.py", line 37, in compute_batch
L = estimate_L(self.acquisition.model.model,self.acquisition.space.get_bounds())
File "D:\program files(x86)\python\lib\site-packages\GPyOpt\core\evaluators\batch_local_penalization.py", line 66, in estimate_L
res = scipy.optimize.minimize(df,x0, method='L-BFGS-B',bounds=bounds, args = (model,x0), options = {'maxiter': 200})
File "D:\program files(x86)\python\lib\site-packages\scipy\optimize_minimize.py", line 618, in minimize
callback=callback, **options)
File "D:\program files(x86)\python\lib\site-packages\scipy\optimize\lbfgsb.py", line 308, in _minimize_lbfgsb
finite_diff_rel_step=finite_diff_rel_step)
File "D:\program files(x86)\python\lib\site-packages\scipy\optimize\optimize.py", line 262, in _prepare_scalar_function
finite_diff_rel_step, bounds, epsilon=epsilon)
File "D:\program files(x86)\python\lib\site-packages\scipy\optimize_differentiable_functions.py", line 95, in init
self._update_grad()
File "D:\program files(x86)\python\lib\site-packages\scipy\optimize_differentiable_functions.py", line 171, in _update_grad
self._update_grad_impl()
File "D:\program files(x86)\python\lib\site-packages\scipy\optimize_differentiable_functions.py", line 92, in update_grad
**finite_diff_options)
File "D:\program files(x86)\python\lib\site-packages\scipy\optimize_numdiff.py", line 388, in approx_derivative
raise ValueError("f0
passed has more than 1 dimension.")
ValueError: f0
passed has more than 1 dimension.