This repository was archived by the owner on Jan 8, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathevaluationStrategy.m
52 lines (45 loc) · 1.62 KB
/
evaluationStrategy.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
function evaluationStrategy(evaluation_name, strategies, do_plot, strategies_legend)
% evaluationStrategy - Plot effectiveness and efficiency for the given
% strategies.
%
% Example: evaluationStrategy('my-evaluation', {'my-strategy'}, true, {'My Strategy'})
%
% evaluation_name: Name of the evaluation
% strategies: Cell list of strategies
% (do_plot): Optional set to true, if a plot should be created
% (strategies_legend): Optional legend lables for the given strategies
%
if nargin < 2
error('Not enough input arguments.')
elseif nargin < 3
do_plot = false;
end
if nargin < 4
strategies_legend = strategies;
end
evaluation_dir = getEvaluationDir(evaluation_name);
fprintf('%s\t%s\t%s\t%s\n','effectiveness', 'efficiency', 'publications', 'strategy')
for i = 1:length(strategies)
filename = fullfile(evaluation_dir, strcat('meta_', strategies{i}, '.csv'));
% author_ids, author_num_citations, author_num_publications,
% num_inspected_publications, num_citations
C = readLog(filename, '%u32 %f %f %f %f', 1);
plotStrategy(strategies{i}, C{2}, C{4}, C{5}, do_plot);
end
if do_plot
figure(1)
grid on
legend(strategies_legend)
%title('effectiveness')
xlabel('Author')
ylabel('Effectiveness')
axis([1, 50, 0, 1])
figure(2)
grid on
legend(strategies_legend)
%title('efficiency')
xlabel('Author')
ylabel('Efficiency')
axis([1, 50, 0, 0.2])
end
end