The below code will help us in building the ROC curve:
library(ROCR)
prediction(pred_heart, test$target)-> roc_pred_heart
performance(roc_pred_heart, “tpr”, “fpr”)->roc_curve
plot(roc_curve, colorize=T)
Graph:
Go through this Data Science Course in Enakulam to get a clear understanding of Data Science!