-
Notifications
You must be signed in to change notification settings - Fork 6
/
print_on_screen.m
37 lines (35 loc) · 920 Bytes
/
print_on_screen.m
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
function print_on_screen(acc, num_task, annotations, id)
method = {
'NA '
'LDADA '
'ORACLE '
};
if nargin > 2
fprintf('--------------------------------------\n')
fprintf([annotations.prm.sourceName '-->' annotations.prm.targetName '\n'])
for i = 1:length(method)
fprintf( ...
['acccuracy - ' method{i} ' = %3.1f(%3.1f)\n'], ...
acc{i,id}{1}, ...
acc{i,id}{2} ...
)
end
fprintf('--------------------------------------\n')
else
avg_acc = 0;
for i = 1:length(method)
for j = 1:num_task
avg_acc = avg_acc + acc{i,j}{1};
end
acc{i,num_task+1} = avg_acc / num_task;
avg_acc = 0;
end
fprintf('--------------------------------------\n')
for i = 1:length(method)
fprintf( ...
['mean average accuracy - ' method{i} ' = %3.1f\n'], ...
acc{i,num_task+1} ...
)
end
fprintf('--------------------------------------\n')
end