[vlfeat] 17/44: vl_roc.m: improves doc and returns EER threhsold in the info structure vl_pr.m: improves doc
Dima Kogan
dima at secretsauce.net
Wed Sep 16 21:05:29 UTC 2015
This is an automated email from the git hooks/post-receive script.
dkogan-guest pushed a commit to branch master
in repository vlfeat.
commit a4e96ebe23ce6ab761119aa0fb3bca9aaf1e8b96
Author: Andrea Vedaldi <vedaldi at gmail.com>
Date: Fri Oct 31 18:10:49 2014 +0000
vl_roc.m: improves doc and returns EER threhsold in the info structure
vl_pr.m: improves doc
---
toolbox/plotop/vl_pr.m | 2 +-
toolbox/plotop/vl_roc.m | 10 ++++++++++
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/toolbox/plotop/vl_pr.m b/toolbox/plotop/vl_pr.m
index 87b67ee..376ea3f 100644
--- a/toolbox/plotop/vl_pr.m
+++ b/toolbox/plotop/vl_pr.m
@@ -84,7 +84,7 @@ function [recall, precision, info] = vl_pr(labels, scores, varargin)
% NUMNEGATIVES.
%
% Stable:: false
-% If set to true, RECALL and PRECISION are returned the same order
+% If set to true, RECALL and PRECISION are returned in the same order
% of LABELS and SCORES rather than being sorted by decreasing
% score (increasing recall). Samples with -INF scores are assigned
% RECALL and PRECISION equal to NaN.
diff --git a/toolbox/plotop/vl_roc.m b/toolbox/plotop/vl_roc.m
index 11dafe7..4f34877 100644
--- a/toolbox/plotop/vl_roc.m
+++ b/toolbox/plotop/vl_roc.m
@@ -42,6 +42,9 @@ function [tpr,tnr,info] = vl_roc(labels, scores, varargin)
% The equal error rate is the value of FPR (or FNR) when the ROC
% curves intersects the line connecting (0,0) to (1,1).
%
+% info.eerThreshold:: EER threshold.
+% The value of the score for which the EER is attained.
+%
% VL_ROC() accepts the following options:
%
% Plot:: []
@@ -70,6 +73,11 @@ function [tpr,tnr,info] = vl_roc(labels, scores, varargin)
% a subset of highly-scoring results are recorded for efficiency
% reason.
%
+% Stable:: false
+% If set to true, TPR and TNR are returned in the same order
+% of LABELS and SCORES rather than being sorted by decreasing
+% score.
+%
% About the ROC curve::
% Consider a classifier that predicts as positive all samples whose
% score is not smaller than a threshold S. The ROC curve represents
@@ -168,12 +176,14 @@ if nargout > 2 || do_plots
s = max(find(tnr > tpr)) ;
if s == length(tpr)
info.eer = NaN ;
+ info.eerThreshold = 0 ;
else
if tpr(s) == tpr(s+1)
info.eer = 1 - tpr(s) ;
else
info.eer = 1 - tnr(s) ;
end
+ info.eerThreshold = scores(perm(s)) ;
end
end
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/vlfeat.git
More information about the debian-science-commits
mailing list