ymattu / MlBayesOpt

R package to tune parameters for machine learning(Support Vector Machine, Random Forest, and Xgboost), using bayesian optimization with gaussian process
Other
45 stars 15 forks source link

Error with max_depth in xgb_cv_opt #57

Open Hartsord opened 6 years ago

Hartsord commented 6 years ago

Hello, I'm getting an error with xgb_cv_opt:

Error in xgb.iter.update(fd$bst, fd$dtrain, iteration - 1, obj) : Invalid Parameter format for max_depth expect int but value='8.26801588479429' Timing stopped at: 0.9 0.08 0.982

I'm currently experimenting with your package, and this is what the call currently looks like:

opt_cv <- xgb_cv_opt(data = train_matrix, label = y_train, objectfun = "binary:logistic", evalmetric = "logloss",

eta_range = c(0.1, 1),

               max_depth_range = c(5, 9),
               #nrounds_range = c(100, 400), 
               n_folds = 5,
               init_points = 6,
               n_iter = 1)

Obviously, max_depth can't be a non-integer, so what's going on?

ymattu commented 5 years ago

max_depth can't be a non-integer

Yes, you are right. I will fix about max_depth param.