for i in range(103): # we will run 100 experiments of GP => 100 befief updates of the good region.
existing_bayesian_optimizer = os.path.isfile(out_dir + "ev_file_RL_ANN") # ev_file is a simple txt file (empty @ beginning) "warning \n"
if GP:
if existing_bayesian_optimizer :
evals = pd.read_csv(out_dir+"ev_file_RL_ANN", index_col=0, delimiter="\t")
Y = np.array([[x] for x in evals["Y"]],dtype=np.float32) # Just want add dimensions ??
X = np.array(evals.filter(regex="var*"),dtype=np.float32)
myBopt = GPyOpt.methods.BayesianOptimization(f=myfunc, domain=bounds, constraints=None, Y=Y,X=X, initial_design_numdata=3, maximize=False)
**myBopt.run_optimization(max_iter=1, verbosity=True, report_file=out_dir+"bayesian_optimizer_RL_ANN_log.txt", models_file=out_dir+"bayes_opt_RL_ANN_model", eps=0)** This is the line 198
myBopt.save_evaluations(out_dir+"ev_file_RL_ANN")
myBopt.save_models(out_dir+"mod_file_RL_ANN")
else :
myBopt = GPyOpt.methods.BayesianOptimization(f=myfunc, domain= bounds, constraints=None, initial_design_numdata=3, maximize=False)
myBopt.run_optimization(max_iter=1, verbosity=True, report_file=out_dir+"bayesian_optimizer_RL_ANN_log.txt", models_file=out_dir+"bayes_opt_RL_ANN_model", eps=0)
myBopt.save_evaluations(out_dir+"ev_file_RL_ANN") #if not saved, then create an empty file in result_new_train called "ev_file_RL_ANN"
myBopt.save_models(out_dir+"mod_file_RL_ANN")
else:
pass
所以当我在这里运行贝叶斯优化时,它一直告诉我这个错误[在此处输入图像描述][1]
有人可以帮我弄这个吗?太感谢了![1]:https ://i.stack.imgur.com/bHCrC.png