tune_grid completes but all models error. .notes all indicate the error: Error in xgboost::xgb.DMatrix(x, label = y, missing = NA): REAL() can only be applied to a 'numeric', not a 'logical'"
I've checked the parameters object and am unable to determine where a logical is coming from. I stepped down into the tune_grid function and the grid passed into the foreach loop checks out, so I'm assuming the model specification for xgboost is passing parameters to xgb.DMatrix in a way that is causing the error.
Here are the data dependencies to run the reprex (19MB).
This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.
The problem
tune_grid
completes but all models error..notes
all indicate the error:Error in xgboost::xgb.DMatrix(x, label = y, missing = NA): REAL() can only be applied to a 'numeric', not a 'logical'"
I've checked the parameters object and am unable to determine where a logical is coming from. I stepped down into thetune_grid
function and the grid passed into theforeach
loop checks out, so I'm assuming the model specification forxgboost
is passing parameters toxgb.DMatrix
in a way that is causing the error. Here are the data dependencies to run the reprex (19MB).Reproducible example
Created on 2021-05-13 by the reprex package (v0.3.0)
Session info
``` r devtools::session_info() #> Error in get(genname, envir = envir) : object 'testthat_print' not found #> - Session info --------------------------------------------------------------- #> setting value #> version R version 4.0.2 (2020-06-22) #> os Windows 10 x64 #> system x86_64, mingw32 #> ui RTerm #> language (EN) #> collate English_United States.1252 #> ctype English_United States.1252 #> tz America/New_York #> date 2021-05-13 #> #> - Packages ------------------------------------------------------------------- #> package * version date lib source #> assertthat 0.2.1 2019-03-21 [1] CRAN (R 4.0.2) #> backports 1.1.8 2020-06-17 [1] CRAN (R 4.0.2) #> callr 3.4.3 2020-03-28 [1] CRAN (R 4.0.2) #> class 7.3-17 2020-04-26 [1] CRAN (R 4.0.2) #> cli 2.0.2 2020-02-28 [1] CRAN (R 4.0.2) #> codetools 0.2-16 2018-12-24 [1] CRAN (R 4.0.2) #> colorspace 1.4-1 2019-03-18 [1] CRAN (R 4.0.2) #> crayon 1.3.4 2017-09-16 [1] CRAN (R 4.0.2) #> desc 1.2.0 2018-05-01 [1] CRAN (R 4.0.2) #> devtools 2.3.0 2020-04-10 [1] CRAN (R 4.0.2) #> dials 0.0.9.9000 2021-05-11 [1] Github (tidymodels/dials@2916a62) #> DiceDesign 1.8-1 2019-07-31 [1] CRAN (R 4.0.2) #> digest 0.6.25 2020-02-23 [1] CRAN (R 4.0.2) #> dplyr 1.0.0 2020-05-29 [1] CRAN (R 4.0.2) #> ellipsis 0.3.1 2020-05-15 [1] CRAN (R 4.0.2) #> evaluate 0.14 2019-05-28 [1] CRAN (R 4.0.2) #> fansi 0.4.1 2020-01-08 [1] CRAN (R 4.0.2) #> foreach 1.5.0 2020-03-30 [1] CRAN (R 4.0.2) #> fs 1.4.2 2020-06-30 [1] CRAN (R 4.0.2) #> furrr 0.1.0 2018-05-16 [1] CRAN (R 4.0.2) #> future 1.18.0 2020-07-09 [1] CRAN (R 4.0.2) #> generics 0.1.0 2020-10-31 [1] CRAN (R 4.0.5) #> ggplot2 3.3.2 2020-06-19 [1] CRAN (R 4.0.2) #> globals 0.12.5 2019-12-07 [1] CRAN (R 4.0.0) #> glue 1.4.1 2020-05-13 [1] CRAN (R 4.0.2) #> gower 0.2.2 2020-06-23 [1] CRAN (R 4.0.2) #> GPfit 1.0-8 2019-02-08 [1] CRAN (R 4.0.2) #> gtable 0.3.0 2019-03-25 [1] CRAN (R 4.0.2) #> highr 0.8 2019-03-20 [1] CRAN (R 4.0.2) #> htmltools 0.5.0 2020-06-16 [1] CRAN (R 4.0.2) #> ipred 0.9-9 2019-04-28 [1] CRAN (R 4.0.2) #> iterators 1.0.12 2019-07-26 [1] CRAN (R 4.0.2) #> knitr 1.29 2020-06-23 [1] CRAN (R 4.0.2) #> lattice 0.20-41 2020-04-02 [1] CRAN (R 4.0.2) #> lava 1.6.7 2020-03-05 [1] CRAN (R 4.0.2) #> lhs 1.0.2 2020-04-13 [1] CRAN (R 4.0.2) #> lifecycle 0.2.0 2020-03-06 [1] CRAN (R 4.0.2) #> listenv 0.8.0 2019-12-05 [1] CRAN (R 4.0.2) #> lubridate 1.7.9 2020-06-08 [1] CRAN (R 4.0.2) #> magrittr 1.5 2014-11-22 [1] CRAN (R 4.0.2) #> MASS 7.3-51.6 2020-04-26 [1] CRAN (R 4.0.2) #> Matrix 1.2-18 2019-11-27 [1] CRAN (R 4.0.2) #> memoise 1.1.0 2017-04-21 [1] CRAN (R 4.0.2) #> munsell 0.5.0 2018-06-12 [1] CRAN (R 4.0.2) #> nnet 7.3-14 2020-04-26 [1] CRAN (R 4.0.2) #> parsnip 0.1.5 2021-01-19 [1] CRAN (R 4.0.5) #> pillar 1.6.0 2021-04-13 [1] CRAN (R 4.0.5) #> pkgbuild 1.1.0 2020-07-13 [1] CRAN (R 4.0.2) #> pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 4.0.2) #> pkgload 1.1.0 2020-05-29 [1] CRAN (R 4.0.2) #> plyr 1.8.6 2020-03-03 [1] CRAN (R 4.0.2) #> prettyunits 1.1.1 2020-01-24 [1] CRAN (R 4.0.2) #> pROC 1.16.2 2020-03-19 [1] CRAN (R 4.0.2) #> processx 3.4.3 2020-07-05 [1] CRAN (R 4.0.2) #> prodlim 2019.11.13 2019-11-17 [1] CRAN (R 4.0.2) #> ps 1.3.3 2020-05-08 [1] CRAN (R 4.0.2) #> purrr 0.3.4 2020-04-17 [1] CRAN (R 4.0.2) #> R6 2.4.1 2019-11-12 [1] CRAN (R 4.0.2) #> Rcpp 1.0.5 2020-07-06 [1] CRAN (R 4.0.2) #> recipes 0.1.16 2021-04-16 [1] CRAN (R 4.0.5) #> remotes 2.1.1 2020-02-15 [1] CRAN (R 4.0.2) #> rlang 0.4.11 2021-04-30 [1] CRAN (R 4.0.5) #> rmarkdown 2.3 2020-06-18 [1] CRAN (R 4.0.2) #> rpart 4.1-15 2019-04-12 [1] CRAN (R 4.0.2) #> rprojroot 1.3-2 2018-01-03 [1] CRAN (R 4.0.2) #> rsample 0.1.0 2021-05-08 [1] CRAN (R 4.0.2) #> scales 1.1.1 2020-05-11 [1] CRAN (R 4.0.2) #> sessioninfo 1.1.1 2018-11-05 [1] CRAN (R 4.0.2) #> stringi 1.4.6 2020-02-17 [1] CRAN (R 4.0.0) #> stringr 1.4.0 2019-02-10 [1] CRAN (R 4.0.2) #> survival 3.1-12 2020-04-10 [1] CRAN (R 4.0.2) #> testthat 2.3.2 2020-03-02 [1] CRAN (R 4.0.2) #> tibble 3.1.1 2021-04-18 [1] CRAN (R 4.0.5) #> tidyr 1.1.0 2020-05-20 [1] CRAN (R 4.0.2) #> tidyselect 1.1.0 2020-05-11 [1] CRAN (R 4.0.2) #> timeDate 3043.102 2018-02-21 [1] CRAN (R 4.0.0) #> tune 0.1.5.9000 2021-05-13 [1] Github (tidymodels/tune@b0e83a7) #> usethis 1.6.1 2020-04-29 [1] CRAN (R 4.0.2) #> utf8 1.1.4 2018-05-24 [1] CRAN (R 4.0.2) #> vctrs 0.3.8 2021-04-29 [1] CRAN (R 4.0.5) #> withr 2.2.0 2020-04-20 [1] CRAN (R 4.0.2) #> workflows 0.2.2 2021-03-10 [1] CRAN (R 4.0.5) #> xfun 0.15 2020-06-21 [1] CRAN (R 4.0.2) #> yaml 2.2.1 2020-02-01 [1] CRAN (R 4.0.0) #> yardstick 0.0.7 2020-07-13 [1] CRAN (R 4.0.2) #> #> [1] C:/Program Files/Microsoft/R Open/R-4.0.2/library ```