To plot roc curve:
library(ROCR)
<data cleaning/scrubbing>
<train data>
.....
.....
rf.perf = performance(rf.prediction, "tpr", "fpr") #for RF
logit.perf = performance (logit.prediction, "tpr", "fpr") #for logistic reg
tree.perf = performance(tree.prediction, "tpr", "fpr") #for cart tree
...
plot(re.perf) #a RF roc curve
If I want to run a xgboost
classification and subsequently plotting roc:
objective = "binary:logistics"
I'm confused with the xgboost's arguments metrics "auc" (page 9 of the CRAN manual), it says area. How does one plot the curve with tpr and fpr for model comparison?
I tried search the net and github, most emphasis on feature importance graph (for xgboost
).
Thanks