If you would like to run a method on a crowdsourced dataset (with workers' answers), then a direct way is to just execute run.py
in the downloaded project (see Downloads section below) with four parameters: (1) 'method_file_path', (2) 'answer_file_path', (3) 'result_file_path', and (4) 'task type'. Next we introduce the four parameters in detail.
Parameters:
- 'method_file_path': the path of the algorithm source file. Note that we provide all 17 algorithms' source codes (as compared in the paper) in the
methods
folder, and each method's source file is always the filemethod.py
under respective folders mentioned in the table below.
For example, if you would like to run D&S method as mentioned in the paper, then it is in fact implemented in the filemethods/c_EM/method.py
. Similarly for other methods, you can just replacec_EM
with the corresponding folder (can be found in the table below) in the above file path. - 'answer_file_path': the path of the answer file.
The format of answer file (i.e., a
csv
file) is:
(1) the first line is always 'question,worker,answer';
(2) the lines followed will be the instances of 'question,worker,answer', indicating that worker has answered question with the answer.
Next we show an example answer file: - 'result_file_path': the path of result file, containing the inferred truth of the algorithm on the above answer file. The result file is a
csv
file, and each line contains a question and its inferred truth. - 'task type': it can only be Decision-Making, Single_Choice, or Numeric, indicating different task types.
Methods | Task Types | Folder |
---|---|---|
MV | Decision-Making, Single_Choice | c_MV |
GLAD | Decision-Making, Single_Choice | c_GLAD |
D&S | Decision-Making, Single_Choice | c_EM |
Minimax | Decision-Making, Single_Choice | l_minimax |
BCC | Decision-Making, Single_Choice | l_BCC |
CBCC | Decision-Making, Single_Choice | l_CBCC |
LFC | Decision-Making, Single_Choice | l_LFCbinay, l_LFCmulti |
CATD | Decision-Making, Single_Choice, Numeric | c_CATD |
PM | Decision-Making, Single_Choice, Numeric | c_PM-CRH |
Multi | Decision-Making | c_multidimensional |
KOS | Decision-Making | l_KOS-1 |
VI-BP | Decision-Making | l-VI-BP-2 |
VI-MF | Decision-Making | l_VI-MF-2 |
LFC_N | Numeric | l_LFCcont |
Mean | Numeric | l_mean |
Median | Numeric | l_median |
Let us now give an example as follows:
python run.py methods/c_EM/method.py ./demo_answer_file.csv ./demo_result_file.csv decision-making
It will invoke D&S algorithm to read './demo_answer_file.csv' as the input (the tasks are 'decision-making' tasks), and the output will be in the file './demo_result_file.csv'.