XBART icon indicating copy to clipboard operation
XBART copied to clipboard

XBART.CLT std::bad_alloc error, R

Open mm0708 opened this issue 4 years ago • 0 comments

When attempting to use XBART.CLT for binary classification I get the following error:

Error in XBART_CLT_cpp(y, X, Xtest, num_trees, num_sweeps, max_depth, : std::bad_alloc

Seems to be a C++ error in the backend? I do not encounter this error when running XBART() on the example found here: https://github.com/JingyuHe/XBART/blob/master/tests/test.R

Session info:

sessionInfo() R version 4.0.2 (2020-06-22) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 21327)

Matrix products: default

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

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

other attached packages: [1] forcats_0.5.0 stringr_1.4.0 dplyr_1.0.2 purrr_0.3.4 readr_1.3.1 tidyr_1.1.2 tibble_3.0.3 ggplot2_3.3.2 tidyverse_1.3.0 data.table_1.13.6 XBART_0.3

loaded via a namespace (and not attached): [1] Rcpp_1.0.6 lubridate_1.7.9 lattice_0.20-41 class_7.3-17 assertthat_0.2.1 ipred_0.9-9 foreach_1.5.0 R6_2.4.1 cellranger_1.1.0 plyr_1.8.6
[11] backports_1.1.7 stats4_4.0.2 reprex_0.3.0 e1071_1.7-3 httr_1.4.2 pillar_1.4.6 rlang_0.4.8 caret_6.0-86 readxl_1.3.1 rstudioapi_0.11
[21] blob_1.2.1 rpart_4.1-15 Matrix_1.2-18 splines_4.0.2 gower_0.2.2 munsell_0.5.0 broom_0.7.0 compiler_4.0.2 modelr_0.1.8 pkgconfig_2.0.3
[31] nnet_7.3-14 tidyselect_1.1.0 prodlim_2019.11.13 codetools_0.2-16 fansi_0.4.1 crayon_1.3.4 dbplyr_1.4.4 withr_2.3.0 ModelMetrics_1.2.2.2 MASS_7.3-51.6
[41] recipes_0.1.15 grid_4.0.2 nlme_3.1-148 jsonlite_1.7.2 gtable_0.3.0 lifecycle_0.2.0 DBI_1.1.0 magrittr_2.0.1 pROC_1.16.2 scales_1.1.1
[51] cli_2.0.2 stringi_1.5.3 reshape2_1.4.4 fs_1.4.1 timeDate_3043.102 xml2_1.3.2 ellipsis_0.3.1 generics_0.1.0 vctrs_0.3.2 lava_1.6.7
[61] iterators_1.0.12 tools_4.0.2 glue_1.4.1 hms_0.5.3 survival_3.1-12 yaml_2.2.1 colorspace_1.4-1 rvest_0.3.5 haven_2.3.1

mm0708 avatar Mar 06 '21 22:03 mm0708