Skip to main content

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!

Include more data into your test set.

Sometimes algorithms like Neural Network gives classification output such that all the output labels are the same. Eg: Suppose your actual labels are like this: c(1,0,0,1,1,0,0,1,1,1). You might end up training your neural network(I am mentioning neural network specifically because i have faced 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).

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!

Include more data into your test set.

Sometimes algorithms like Neural Network give classification output such that all the output labels are the same.

For example, suppose your actual labels are like this: c(1,0,0,1,1,0,0,1,1,1).
You might end up training your neural network  (I am mentioning neural network specifically because I 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).

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!

Source Link

Include more data into your test set.

Sometimes algorithms like Neural Network gives classification output such that all the output labels are the same. Eg: Suppose your actual labels are like this: c(1,0,0,1,1,0,0,1,1,1). You might end up training your neural network(I am mentioning neural network specifically because i have faced 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).

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!