-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathqualification_t.m
More file actions
35 lines (32 loc) · 1.01 KB
/
qualification_t.m
File metadata and controls
35 lines (32 loc) · 1.01 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
%@author Tiffany Jann
%@date August 13, 2017
%@contact jann.tiffany@gmail.com
%%%%% THIS IS A HELPER FUNCTION FOR MAIN SCRIPTS
function val = qualification_t(original, test_data, num_time_series, num_nodes)
const = length(original);
rocile = double(const); % preallocating space to save computation resources
for i = 1:const
res = original(i,:) - test_data(i,:);
rocile(i) = signtest(sort(res));
clear res;
end
zygote(1) = quantile(rocile, 0.25);
clear i rocile;
if zygote < 0.01
% disp('stop here! qualification failed.');
val = "failed qualification";
else
% disp('qualification passed! move to evaluation')
%%%%% EVALUATION %%%%%
for i = 1:num_time_series
startt = (i-1)*num_nodes+1;
endd = i*num_nodes;
roche(i,1) = benchmark(original(startt:endd,:)', test_data(startt:endd,:)' );
clear startt endd;
end
zygote(2) = sum(roche)/num_time_series;
clear i roche;
% disp('mean area between the curve: ')
% disp(zygote(2))
val = zygote(2);
end