Closed cinaljess closed 6 years ago
My attempted fix is to change line 95 of rfmodel.py to encapsulate X[k, :] in a list: preds.append(pred.predict([X[k,:]])[0]) The RF model now runs but I have to evaluate if it runs correctly.
I could not run the Gpyopt(which model is RF) too. Error message is "get_model_parametes() does not exist" Did you add "save_models_parameters=False" to get past this exception? where did you add? thank you.
I am not an author so in lieu of a best solution I'll offer a working one. You can add save_models_parameters=False to the line that runs optimization on your Bopt model.
eg. myBopt2D.run_optimization(max_iter,max_time,verbosity=False, save_models_parameters=False)
thank you for your reply. this information is useful for me.
Hello,
In GPyOpt_reference_manual.ipynb (In 19, 20) I attempt to change the model_type from 'GP' to 'RF' for the sixhumpcamel example.
myBopt2D = GPyOpt.methods.BayesianOptimization(f_sim.f,
domain=bounds,
model_type = 'RF',
acquisition_type='EI',
normalize_Y = True,
acquisition_weight = 2)
# runs the optimization for the three methods
max_iter = 40 # maximum time 40 iterations
max_time = 60 # maximum time 60 seconds
myBopt2D.run_optimization(max_iter,max_time,verbosity=False, save_models_parameters=False)
I added
save_models_parameters=False
to get past an exception, but then it seems to fail during the prediction method complaining of requiring a 2D array but only having a 1D array. Stack trace below:Thank you,