Created
September 19, 2016 13:28
-
-
Save Yankim/98090929cb099360602b10be2f838975 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Predicting training data | |
xgmat.train <- xgb.DMatrix(as.matrix(higgs.train.dummy), | |
label = as.numeric(higgs.labels == "X0"), | |
weight = scaled.weight) | |
xgboostTrainPred <- predict(bst, newdata = xgmat.train) | |
labels <- ifelse(as.character(higgs.labels)=="X1", 1, 0) | |
auc = roc(labels, xgboostTrainPred) | |
plot(auc, print.thres=TRUE) | |
######## From the graph, we can tell the best threshold is 0.002 | |
threshold <- 0.662 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment