Include more data into your test set.
Sometimes algorithms like Neural Network givesgive classification output such that all the output labels are the same. Eg: Suppose
For example, suppose your actual labels are like this: c(1,0,0,1,1,0,0,1,1,1)c(1,0,0,1,1,0,0,1,1,1)
. You
You might end up training your neural network (I am mentioning neural network specifically because iI have faced this problem while applying the algorithm) in such a way that the output labels come out to be: c(1,1,1,1,1,1,1,1,1,1)c(1,1,1,1,1,1,1,1,1,1)
.
In such a case, your auc/roc functions would show the above mentioned error as these are no 0 labels in predicted data.
Hope this might help!