Open felxcon opened 2 years ago
Hi!
I think the issues lays with bagging_fraction aka. sample_size being "protected"! -> https://github.com/tidymodels/parsnip/issues/136#issuecomment-695845233 (.notes: The following arguments cannot be manually modified and were removed: bagging_fraction.)
For information: setting arguments in lgbm can be accomplished by using "set_mode" (> https://www.rebeccabarter.com/blog/2020-03-25_machine_learning/). strings then should be in " arg ", e.g. tree_learner = "data".
Kindly
Hi everybody! The problem
I am following https://www.r-bloggers.com/2020/08/how-to-use-lightgbm-with-tidymodels/. When implemented all supported boost_tree() parameters for lightgbm I get an error message with trying to tune() sample_size():
(Warning message: All models failed. See the .notes column.
A tibble: 1 x 1
.notes
1 internal: Error: All unnamed arguments must be length 1)
I'm having trouble with solving this issue, tried approaches of others on tune()+sample_size or any (few) hints for internal: Error: ... could not solve that. Any suggestions? I would be very glad for expertise:)
! I also wonder where to adapt lightgbm default settings (its not in "set_engine" .X); I would like to run lightgbm with
num_threads = 3,
Thanks a lot, Felix
Reproducible example
Created on 2022-02-26 by the reprex package (v2.0.1)
Session info
``` r sessionInfo() #> R version 4.1.2 (2021-11-01) #> Platform: x86_64-w64-mingw32/x64 (64-bit) #> Running under: Windows 10 x64 (build 19044) #> #> Matrix products: default #> #> locale: #> [1] LC_COLLATE=German_Germany.1252 LC_CTYPE=German_Germany.1252 #> [3] LC_MONETARY=German_Germany.1252 LC_NUMERIC=C #> [5] LC_TIME=German_Germany.1252 #> #> attached base packages: #> [1] parallel stats graphics grDevices utils datasets methods #> [8] base #> #> other attached packages: #> [1] doParallel_1.0.17 iterators_1.0.14 foreach_1.5.2 #> [4] ggplot2_3.3.5 treesnip_0.1.0.9000 yardstick_0.0.9 #> [7] workflows_0.2.4 dials_0.1.0 scales_1.1.1 #> [10] tune_0.1.6 parsnip_0.1.7 rsample_0.1.1 #> [13] recipes_0.2.0 dplyr_1.0.8 janitor_2.1.0 #> [16] lightgbm_3.3.2 R6_2.5.1 #> #> loaded via a namespace (and not attached): #> [1] tidyr_1.2.0 jsonlite_1.7.3 splines_4.1.2 prodlim_2019.11.13 #> [5] assertthat_0.2.1 highr_0.9 GPfit_1.0-8 yaml_2.3.5 #> [9] globals_0.14.0 ipred_0.9-12 pillar_1.7.0 lattice_0.20-45 #> [13] glue_1.6.1 pROC_1.18.0 digest_0.6.29 snakecase_0.11.0 #> [17] hardhat_0.2.0 colorspace_2.0-2 plyr_1.8.6 htmltools_0.5.2 #> [21] Matrix_1.4-0 timeDate_3043.102 pkgconfig_2.0.3 lhs_1.1.4 #> [25] DiceDesign_1.9 listenv_0.8.0 purrr_0.3.4 gower_1.0.0 #> [29] lava_1.6.10 tibble_3.1.6 generics_0.1.2 ellipsis_0.3.2 #> [33] withr_2.4.3 furrr_0.2.3 nnet_7.3-17 cli_3.2.0 #> [37] survival_3.2-13 magrittr_2.0.2 crayon_1.5.0 evaluate_0.15 #> [41] fs_1.5.2 future_1.24.0 fansi_1.0.2 parallelly_1.30.0 #> [45] MASS_7.3-55 class_7.3-20 tools_4.1.2 data.table_1.14.2 #> [49] lifecycle_1.0.1 stringr_1.4.0 munsell_0.5.0 reprex_2.0.1 #> [53] compiler_4.1.2 rlang_1.0.1 grid_4.1.2 rstudioapi_0.13 #> [57] rmarkdown_2.11 gtable_0.3.0 codetools_0.2-18 DBI_1.1.2 #> [61] lubridate_1.8.0 knitr_1.37 fastmap_1.1.0 future.apply_1.8.1 #> [65] utf8_1.2.2 stringi_1.7.6 Rcpp_1.0.8 vctrs_0.3.8 #> [69] rpart_4.1.16 tidyselect_1.1.2 xfun_0.29 ```