From 8bc63e51d52eecb25622afe0eef95cdfb3b2e6fd Mon Sep 17 00:00:00 2001 From: bklare Date: Tue, 7 Jul 2015 13:31:40 -0400 Subject: [PATCH] Script to compute ROC score at a specific point --- scripts/matlab/mmn.m | 3 +++ scripts/matlab/rocPoint.m | 8 ++++++++ 2 files changed, 11 insertions(+), 0 deletions(-) create mode 100644 scripts/matlab/mmn.m create mode 100644 scripts/matlab/rocPoint.m diff --git a/scripts/matlab/mmn.m b/scripts/matlab/mmn.m new file mode 100644 index 0000000..951693b --- /dev/null +++ b/scripts/matlab/mmn.m @@ -0,0 +1,3 @@ +function [S1] = mmn(S) +S1 = (S - min(S(:))) ./ (max(S(:)) - min(S(:))); +end diff --git a/scripts/matlab/rocPoint.m b/scripts/matlab/rocPoint.m new file mode 100644 index 0000000..d858fac --- /dev/null +++ b/scripts/matlab/rocPoint.m @@ -0,0 +1,8 @@ +function [ta score] = getROC(t,f,th) +% [ta] = getROC(t,f,th) + [a1 a2] = min(abs(f - th)); + ta = t(a2); + score = a2; + if max(f) == 0 + ta = 1.0; + end -- libgit2 0.21.4