You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just spent an instructive half hour changing lines in the gbm.step code to get around an error which presented as:
Error in y.data[model.mask]:
! Can't subset columns with model.mask.
x Logical subscript model.mask must be size 1 or 1, not 3779.
Turns out I'd tidied up my code and deleted the line where I converted my dataset into a data.frame, meaning it was left as a tibble after importing the raw data and manipulating it with dplyr.
Result of this is that eval() interpreted by gbm.y variable as a one variable tibble not a vector. Subsequent attempts to subset the y variable for folding etc. then fail throughout the gbm.step code. I 'fixed' this by changing all the lines that didn't work, before realising that the problem was the format of my input data!!!
Can the gbm.step code be modified so that it either converts to a data.frame (with or without a message) OR exits with a warning that the input data are not in the correct format/class?
In the meantime I'll just follow the help file instructions that clearly say that the Argument 'data' must be a data.frame!!
Cheers!
David Tickler
The text was updated successfully, but these errors were encountered:
Just spent an instructive half hour changing lines in the gbm.step code to get around an error which presented as:
Error in
y.data[model.mask]
:! Can't subset columns with
model.mask
.x Logical subscript
model.mask
must be size 1 or 1, not 3779.Turns out I'd tidied up my code and deleted the line where I converted my dataset into a data.frame, meaning it was left as a tibble after importing the raw data and manipulating it with dplyr.
Result of this is that eval() interpreted by gbm.y variable as a one variable tibble not a vector. Subsequent attempts to subset the y variable for folding etc. then fail throughout the gbm.step code. I 'fixed' this by changing all the lines that didn't work, before realising that the problem was the format of my input data!!!
Can the gbm.step code be modified so that it either converts to a data.frame (with or without a message) OR exits with a warning that the input data are not in the correct format/class?
In the meantime I'll just follow the help file instructions that clearly say that the Argument 'data' must be a data.frame!!
Cheers!
David Tickler
The text was updated successfully, but these errors were encountered: