|
Algorithm A1 Copeland score calculation. |
-
Require:
Survey data where each entry is a tuple , , . Each candidate is one of the segmentation masks involved in the survey. I is one of the or images.
% An algorithm to calculate the Copeland score based on candidate pairwise comparisons %
-
1:
function calculateCopelandScore(survey_data)
-
2:
eight segmentation masks for the same fundus image
-
3:
-
4:
-
5:
-
6:
for in do
-
7:
-
8:
-
9:
end for
-
10:
-
11:
for in do
-
12:
-
13:
-
14:
if then
-
15:
-
16:
else if then
-
17:
-
18:
end if
-
19:
end for
-
20:
end function
% Counts how many times has won in pairwise comparisons according to survey data stored in . %
-
21:
functioncountWins(survey_entries, candidate)
-
22:
-
23:
for
in
do
-
24:
-
25:
-
26:
if
in () then
-
27:
if
is
then
-
28:
-
29:
end if
-
30:
end if
-
31:
end for
-
32:
return
-
33:
end function
% Get all combinations of unique candidate pairs. That is 24 for 8 segmentation images. %
-
34:
functiongetCombinations(candidates)
-
35:
-
36:
-
37:
for i
in
to
do
-
38:
-
39:
for j
in
to
do
-
40:
-
41:
-
42:
end for
-
43:
end for
-
44:
end function
|