Skip to content

Commit

Permalink
Fix bugs related to removal of class customization
Browse files Browse the repository at this point in the history
  • Loading branch information
jmgirard committed May 14, 2018
1 parent ca04b8f commit 8085924
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions mBINARY.m
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,7 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

if nargin < 3
POSCLASS = 1;
NEGCLASS = 0;
end

if nargin < 4
if nargin < 2
OUTPUT = 'table';
end

Expand All @@ -55,10 +50,10 @@

TEST = DATA(:, 1);
CRIT = DATA(:, 2);
TP = sum((TEST == POSCLASS) & (CRIT == POSCLASS));
FP = sum((TEST == POSCLASS) & (CRIT == NEGCLASS));
FN = sum((TEST == NEGCLASS) & (CRIT == POSCLASS));
TN = sum((TEST == NEGCLASS) & (CRIT == NEGCLASS));
TP = sum((TEST == 1) & (CRIT == 1));
FP = sum((TEST == 1) & (CRIT == 0));
FN = sum((TEST == 0) & (CRIT == 1));
TN = sum((TEST == 0) & (CRIT == 0));

ACC = (TP + TN) / (TP + TN + FP + FN);
TPR = TP / (TP + FN);
Expand Down

0 comments on commit 8085924

Please sign in to comment.