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

1 view (last 30 days)
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);

Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!