Commit 8d76eab9 authored by Vít Novotný's avatar Vít Novotný
Browse files

Use train subset by default in scripts.ndcg

parent efea5797
Pipeline #57589 failed with stage
in 42 seconds
......@@ -7,7 +7,7 @@ import numpy as np
from .configuration import EVALUATORS, PARSED_RELEVANCE_JUDGEMENTS
def ndcg(parsed_run, task='task1', subset='test'):
def ndcg(parsed_run, task='task1', subset='train'):
only_judged_parsed_run = deepcopy(parsed_run)
parsed_relevance_judgements = PARSED_RELEVANCE_JUDGEMENTS[subset][task]
for topic_name, results in parsed_run.items():
......
......@@ -21,7 +21,7 @@ if __name__ == '__main__':
result_name = re.sub('_', ', ', os.path.basename(result)[:-4])
with open(result, 'rt') as f:
parsed_result = parse_run(f)
user_results.append((ndcg(parsed_result, task), result_name))
user_results.append((ndcg(parsed_result, task, 'test'), result_name))
best_ndcg, best_result_name = max(user_results)
task_results.append((best_ndcg, user_name, best_result_name))
with open(os.path.join(user, 'README.md'), 'wt') as f:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment