how to calculate precision and recall in MATLAB?
6 次查看(过去 30 天)
显示 更早的评论
how to calculate precision and recall in MATLAB?is there any builtin function for this
回答(1 个)
Salma Hassan
2018-1-29
编辑:Salma Hassan
2018-1-29
[Xpr,Ypr,Tpr,AUCpr] =perfcurve(targets, scores, 1, 'xCrit', 'reca', 'yCrit', 'prec');
plot(Xpr,Ypr)
xlabel('Recall'); ylabel('Precision')
title(['Precision-recall curve (AUC: ' num2str(AUCpr) ')'])
****************or you can use these equations
p=tp/(tp+fp);
r= tp/(tp+fn);
F= ( 2*p*r)/(p+r);
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!