0c0f08372b3c6441dda2f291664d40857d0f4b8b,app/grandchallenge/evaluation/utils.py,,generate_rank_dict,#,10

Before Change


    rank = defaultdict(dict)
    pk_val = namedtuple("pk_val", ["pk", "val"])

    if len(queryset) == 0:
        // No results to calculate
        return rank

    for (metric_path, reverse) in zip(metric_paths, metric_reverse):
        // Extract the value of the metric for this primary key and sort on the
        // value of the metric
        pk_vals = [

After Change


            current_rank = 1
        except IndexError:
            // No results to work with for this metric
            continue

        for idx, result_pk_val in enumerate(pk_vals):

            // If the values of the metrics are the same, keep the rank
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: comic/grand-challenge.org
Commit Name: 0c0f08372b3c6441dda2f291664d40857d0f4b8b
Time: 2018-10-26
Author: jamesmeakin@gmail.com
File Name: app/grandchallenge/evaluation/utils.py
Class Name:
Method Name: generate_rank_dict


Project Name: chainer/chainercv
Commit Name: 90b78b1379b3423aa3b4b5d0de7313f88bda23ab
Time: 2019-02-17
Author: yuyuniitani@gmail.com
File Name: chainercv/utils/mask/mask_to_bbox.py
Class Name:
Method Name: mask_to_bbox


Project Name: google/language-resources
Commit Name: edd74909eb1cef75e88e50af6fee48bb6615b7fb
Time: 2016-05-26
Author: mjansche@google.com
File Name: my/tokenize.py
Class Name:
Method Name: main