Create an ROC Curve From Binary Classification Data
显示 更早的评论
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?
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 ROC - AUC 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!