I have used caret library to compute class probabilities and predictions for a binary classification problem, using 10-fold cross validation and 5 times repetition.
Now I have TRUE (observed values for each data point) values, PREDICTED (by an algorithm) values, Class 0 probabilities and Class 1 probabilities which were used by an algorithm to predict class label.
Now how can I create an roc
object using either ROCR
or pROC
library and then calculate auc
value?
Assume that I have all these values stored in predictions
dataframe. e.g. predictions$pred
and predictions$obs
are the predicted and true values respectively, and so on...