I train and make prediction with the following example :
======================= The outputs are :
and :
Now I need to calculate AUC using the AUC package, but I can't quite understand how to do it?
auc(roc(????, ?????))
Thanks Manel
======================= The outputs are :
and :
Now I need to calculate AUC using the AUC package, but I can't quite understand how to do it?
auc(roc(????, ?????))
Thanks Manel
A possible solution could be :
library(AUC)
auc(roc(testing$Class, prediction$R)) # I get as an answer the "AUC"
result.auc <- auc(prediction$M, testing$Class)
result.roc <- roc(testing$Class, prediction$M)
plot(result.roc, print.thres="best", print.thres.best.method="closest.topleft") # plot the curve
You can comment on the solution, please¡¡¡¡