9a4540b682074d3f84a2fc232cf2a832dc96bce7,src/aggregate_results.py,,latexify,#Any#Any#,92
Before Change
header = "run & metric & "
fh.write(header)
for run_name in results["valid"].keys():
for metric, scores in results["valid"][run_name].items():
res_str = "%s & %s & " % (run_name, metric)
metric_scores = [(k, v) for k, v in scores.items()]
metric_scores.sort(key=lambda x: x[0])
//res_str += "& ".join([average(scores[task]) for task in TASKS if task in scores])
res_str += " & ".join(["%.3f" % average(scores[k]) for (k, _) in metric_scores])
res_str += " \\\\\n"
fh.write(res_str)
// aggregated results
// structure is something like
// run name: results
// stopping criteria : metric : scores
all_results = {"valid": defaultdict(lambda: defaultdict(lambda: defaultdict(list))),
"test": defaultdict(lambda: defaultdict(lambda: defaultdict(list)))}
// aggregate results
After Change
try:
res_str += " & %.3f" % average(scores[task])
except:
pdb.set_trace()
res_str += " \\\\\n"
fh.write(res_str)
// aggregated results
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: jsalt18-sentence-repl/jiant
Commit Name: 9a4540b682074d3f84a2fc232cf2a832dc96bce7
Time: 2018-01-19
Author: wang.alex.c@gmail.com
File Name: src/aggregate_results.py
Class Name:
Method Name: latexify
Project Name: HazyResearch/fonduer
Commit Name: b9f40fb90f0ad5d9dca8168db4040462a46510a8
Time: 2018-08-06
Author: lwhsiao@stanford.edu
File Name: fonduer/candidates/candidates.py
Class Name: CandidateExtractorUDF
Method Name: apply
Project Name: NifTK/NiftyNet
Commit Name: f48c16426d78170a944a88deb4ac1830731557bc
Time: 2017-11-08
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/io/image_reader.py
Class Name: ImageReader
Method Name: initialise_reader