Error from AUC function on KNN algorithm Professor Ballings,
My KNN algorithm seems to run fine but when i get to the last line of code and run " > auc(roc(predKNN,testKNN$Dependent))" i get the error
"Error in rank(prob) : argument "prob" is missing, with no default". Even when i download your lecture notes and run your exact code leading
up to the AUC function, I end up getting the same error. How can i fix this problem?
Answers and follow-up questions Answer or follow-up question 1
You have probably loaded the glmnet package at some point (after you loaded AUC).
glmnet also includes a function called auc and will mask the auc function from the AUC package.
The solution is to use
Michel BallingsSign in to be able to add an answer or mark this question as resolved.