主要内容

plotroc

绘制受试者工作特征图

说明

plotroc(targets,outputs) 绘制每个输出类的受试者工作特征。每条曲线越靠近图的左边缘和上边缘,分类就越好。

提示

plotroc 不支持分类目标。要绘制分类目标的 ROC 度量,请使用 rocmetrics

示例

plotroc(targets1,outputs2,'name1',...) 生成多个图。

示例

全部折叠

此示例说明如何绘制模式网络中每个输出类的受试者工作特征。

load simplecluster_dataset
net = patternnet(20);
net = train(net,simpleclusterInputs,simpleclusterTargets);

Figure Neural Network Training (14-Jul-2025 06:05:37) contains an object of type uigridlayout.

simpleclusterOutputs = sim(net,simpleclusterInputs);
plotroc(simpleclusterTargets,simpleclusterOutputs)

Figure Receiver Operating Characteristic (plotroc) contains an axes object. The axes object with title ROC, xlabel False Positive Rate, ylabel True Positive Rate contains 8 objects of type line. These objects represent Class 1, Class 2, Class 3, Class 4.

输入参数

全部折叠

网络目标,指定为矩阵或元胞数组。

网络输出,指定为矩阵或元胞数组。

版本历史记录

在 R2008a 中推出

另请参阅