I'm trying to plot an ROC curve and get the area under the curve. I have a vector PREDICTIONS with the binary prediction, and the vector TRUE with the true values. A positive is 1, and negative is -1.
I tried to call the function like this:
[X,Y] = perfcurve(PREDICTIONS,TRUE,[1 -1]);
But got this error:
[X,Y] = perfcurve(labels,scores,[1 -1]); ??? Error using ==> perfcurve at 368 Less than two classes are found in the array of true class labels.
Can anybody help me out with this?
Best Answer