Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upCross-validation error #30
Comments
bgreenwell
commented
Oct 30, 2018
•
|
|
|
Works fine when the response is coded outside of spam$type <- ifelse(spam$type == "spam", 1, 0)
spam_gbm <- gbm(
type ~ .,
data = spam,
distribution = "bernoulli",
n.trees = 10,
interaction.depth = 5,
shrinkage = 0.001,
bag.fraction = 1,
train.fraction = 0.7,
cv.folds = 5,
verbose = TRUE
) |
|
Looks like the error occurs in # my.data <- data[flag, !(data.names %in% model$response.name)]
my.data <- data[flag, model$var.names] # patch
|