yanyachen / rBayesianOptimization

Bayesian Optimization of Hyperparameters
81 stars 21 forks source link

Error during running code from tutorial # Example 2: Parameter Tuning #19

Open akogay opened 7 years ago

akogay commented 7 years ago

after running code from https://cran.r-project.org/web/packages/rBayesianOptimization/rBayesianOptimization.pdf

Example 2: Parameter Tuning There is mistake:

Error in (function (max.depth, min_child_weight, subsample) : object 'test.auc.mean' not found In addition: Warning message: In .Internal(gc(verbose, reset)) : closing unused RODBC handle 40 Timing stopped at: 0.39 0.19 0.26

yanyachen commented 7 years ago

I guess that you are using the latest version of XGBoost. The version number of XGBoost when I wrote this example is even before 0.60. I think you can update the evaluation function based on the current version of XGBoost accordingly. I will update the example later too. Thank you for reporting this.

queena59 commented 5 years ago

I have meet the same problem and tried to change the code "cv$dt" to "cv$evaluation_log" .there is no error message then

firoz-aziz-ansari commented 5 years ago

@queena59 It didn't solve the problem for me. Did you do any other changes to the code?

queena59 commented 5 years ago

try “summary(cv)”,then find “test_auc_mean “,then change the variable name after “cv$”,I just did that.

发自我的 iPhone

在 2018年9月4日,下午10:19,Firoz Ansari notifications@github.com 写道:

@queena59 It didn't solve the problem for me. Did you do any other changes to the code?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

Phoebeleemz commented 5 years ago

@queena59 When I tried summary(cv), Idk why I did not see "test_auc_mean"

yangluc commented 4 years ago

change it to "Score = cv$evaluation_log[, max(test_auc_mean)]". If you use summary(cv), you can see the following, which means that you should take a look at cv$evaluation_log Length Class Mode
call 9 -none- call
params 7 -none- list
callbacks 2 -none- list
evaluation_log 9 data.table list
niter 1 -none- numeric nfeatures 1 -none- numeric folds 5 -none- list