Error while making plot of precision -recall curve in this code where m i going wrong?

1 次查看(过去 30 天)
function [J,D,rfp,rfn]=segevaluate(o,s)
% gets label matrix for one tissue in segmented and ground truth
% and returns the similarity indices
% m is gold truth
% o is in segmented image
% rfp false pasitive ratio
% rfn false negative ratio
o=o(:);
s=s(:);
common=sum(o & s);
union=sum(o | s);
cm=sum(o); % the number of voxels in m
co=sum(s); % the number of voxels in o
J=common/union;
D=(2*common)/(cm+co);
rfp=(co-common)/cm;
rfn=(cm-common)/cm;
prec=co/sum(co+rfp); recall=co/sum(co+rfn);
*plot(prec,recall,'-',g,'b--o');*
fprintf('precision is %f\n',prec);
fprintf('recall is %f\n',recall);
fprintf('jacarrdindex value is %f\n',Jaccard);
fprintf('Dice overlap is %f\n',Dice);
fprintf('ratio of false positive %f\n',rfp);
fprintf('ratio of false negative is %f\n',rfn);
getting error
??? Error using ==> plot
Invalid property found.
Object Name : line
Property Name : 'g'.
Error in ==> segevaluate at 19 plot(prec,recall,'-','g','b--o');
Error in ==> ROC at 5 s=segevaluate(i,is);

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Image Segmentation and Analysis 的更多信息

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by