yanyachen / rBayesianOptimization

Bayesian Optimization of Hyperparameters
81 stars 21 forks source link

Error: There is no package called 'lhs' #5

Closed BlindApe closed 7 years ago

BlindApe commented 7 years ago

Any tip with this?

init_dt <- data.table('max_depth' = c(6, 7, 8, 10, 12, 15, 18), min_child_weight = c(1, 0, 1, 0, 1, 0, 1), subsample = c(0.95, 0.90, 0.85, 0.85, 0.90, 0.80, 0.85),

  • 'Value' = c(-2.3637, -2.3636, -2.3603, -2.3631, -2.3615, -2.3739, -2.3684))

bayes_tuning <- BayesianOptimization(xgb_cv_bayes, bounds = list(max_depth = c(5L, 25L), min_child_weight = c(0L, 5L), subsample = c(0.8, 0.95)),

  • init_grid_dt = init_dt, init_points = 0, n_iter = 10, acq = 'ucb', kappa = 2.576, eps = 0.0, kernel = list(type = 'matern', nu = 5/2), verbose = TRUE)

7 points in hyperparameter space were pre-sampled

Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : there is no package called ‘lhs’

sessionInfo() R version 3.2.3 (2015-12-10) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 8.1 x64 (build 9600)

locale: [1] LC_COLLATE=Spanish_Spain.1252 LC_CTYPE=Spanish_Spain.1252 LC_MONETARY=Spanish_Spain.1252 LC_NUMERIC=C LC_TIME=Spanish_Spain.1252

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] rBayesianOptimization_1.1.0 xgboost_0.4-3 Matrix_1.2-3 data.table_1.9.6

loaded via a namespace (and not attached): [1] lattice_0.20-33 codetools_0.2-14 foreach_1.4.3 chron_2.3-47 grid_3.2.3 magrittr_1.5 stringi_1.0-1 iterators_1.0.8 tools_3.2.3 stringr_1.0.0 compiler_3.2.3

yanyachen commented 7 years ago

lhs is one of the dependency packages of GPfit. But somehow the GPfit package was not loaded via the namespace. I tried your example with the agaricus data in xgboost package, but I can't reproduce the error. Can you give out a reproducible example for further investigation? Thank you!

BlindApe commented 7 years ago

OK, solved. GPfit didn't install the dependency.