Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
train.y <- train$TARGET
train$TARGET <- NULL
train$TARGET <- train.y
train_new <- sparse.model.matrix(TARGET ~ ., data = train)
dtrain <- xgb.DMatrix(data=train_new, label=train.y)
watchlist <- list(train=dtrain)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.