-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPDBunitMetrics.m
More file actions
executable file
·41 lines (38 loc) · 1.39 KB
/
PDBunitMetrics.m
File metadata and controls
executable file
·41 lines (38 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
classdef PDBunitMetrics < handle
properties
threshold (1,1) double
matchConfidence (1,:) double
firingRate (1,:) double
missingRate (1,1) double
rpvRate (1,1) double
gmFalsePos (1,:) double
gmFalseNeg (1,:) double
FWHM (1,1) double
troughToPeak (1,1) double
meanAC (1,1) double
ACarea (1,1) double
repolarizationSlope (1,1) double
recoverySlope (1,1) double
end
methods
function obj = PDBunitMetrics(varargin)
allowable = fieldnames(obj);
if mod(length(varargin),2) ~= 0
error('Inputs must be in name, value pairs');
end
for v = 1:2:length(varargin)
if find(ismember(allowable,varargin{v}))
obj.(varargin{v}) = varargin{v+1};
else
disp([9 'Not assigning ''' varargin{v} ''': not a field in PDBunitMetrics']);
end
end
end
function fp = falsePositiveRate(obj)
fp = max(obj.rpvRate, sum(obj.gmFalsePos));
end
function fn = falseNegativeRate(obj)
fn = (1 - (1-obj.missingRate)) + sum(obj.gmFalseNeg);
end
end
end