Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
#Predicting the test data
xgmat.test <- xgb.DMatrix(as.matrix(higgs.test.dummy))
xgboostTestPred <- predict(bst, newdata=xgmat.test)
predicted <- rep("s",550000)
predicted[xgboostTestPred>=threshold] <- "b"
weightRank = rank(xgboostTestPred, ties.method= "random")
write.csv(, "Submissions/xgboost_prob.csv")
write.csv(, "Submissions/EventID.csv")
submission = data.frame(EventId = higgs.testId, RankOrder = weightRank, Class = predicted)
write.csv(submission, "xgboost_submission.csv", row.names=FALSE)
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.