我正在使用MATLAB 2018b版本,并希望从MATLAB帮助中执行sample code,这与“ plotroc”函数有关。
我准确地复制并粘贴了过去的代码,并且没有更改,但是出现了一些错误。
%Plot Receiver Operating Characteristic
load simplecluster_dataset
net = patternnet(20);
net = train(net,simpleclusterInputs,simpleclusterTargets);
simpleclusterOutputs = sim(net,simpleclusterInputs);
plotroc(simpleclusterTargets,simpleclusterOutputs)
错误:
Error using roc
Too many output arguments.
Error in plotroc>update_plot (line 355)
[tpr,fpr] = roc(t,y);
Error in plotroc (line 118)
plotData = update_plot(param,fig,plotData,update_args{:});
Error in test (line 14)
plotroc(simpleclusterTargets,simpleclusterOutputs)