Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined columns selected #144

Open
harrysouthworth opened this issue Apr 21, 2017 · 1 comment
Open

undefined columns selected #144

harrysouthworth opened this issue Apr 21, 2017 · 1 comment

Comments

@harrysouthworth
Copy link
Contributor

harrysouthworth commented Apr 21, 2017

No way I can share the data, so not necessarily reproducible.

Data is 20k x 4k, binomial response, 10-fold CV. Gets to end then reports
"Error in [.data.frame(data, flag, model$variables$var_names, drop = FALSE) :
undefined columns selected"

The columns have had make.names run on them, so it's not weird colnames.

Also, it's sucked up all my RAM and isn't letting go... killing the RStudio session did cause it to let go.

gbm 2.2, R 3.3.1, Ubuntu 16.04.2

@harrysouthworth
Copy link
Contributor Author

my_data  <- data[flag, model$variables$var_names, drop=FALSE]

That's in predict.GBMCVFit in gbm-cv-predict.r.

Somewhere, some backquoted variable names have snuck in. The following line is a filthy fix:
model$variables$var_names <- gsub("`", "", model$variables$var_names)

A filthier fix is for the user to use make.names on the data before calling gbm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant