perfcurve返回一个值-MATLAB

问题描述

我想使用perfcurve函数绘制roc(接收器工作特性)后,使用sam(光谱角度映射器)更改高光谱图像中的检测,但是该函数返回一个值。为什么?你能帮我吗?

[Xpr,Ypr,Tpr,AUCpr] = perfcurve(hyperdata_gt,abs(result),'1'); plot(Xpr,Ypr);

enter image description here

解决方法

[X,Y] = perfcurve(labels,scores,posclass);
plot(X,Y);

labels是数据的真实标签,scores是分类器的输出得分(在阈值之前),posclass是标签中的肯定类。

我使用了“阈值之后”。