2999e509688a82f8be65600727a5922b5739822b,conceptnet5/vectors/evaluation/wordsim.py,,compute_semeval_score,#Any#Any#,309

Before Change


    coefficient.
    
    if any(np.isnan(x) or x <=0 for x in [spearman_score["low"], pearson_score["low"]]):
        acc_harmonic_mean = float("NaN")
        low_harmonic_mean = float("NaN")
        high_harmonic_mean = float("NaN")
    else:
        acc_harmonic_mean = hmean([spearman_score["acc"], pearson_score["acc"]])

After Change


    for interval in intervals:
        if any(np.isnan(x) for x in [spearman_score[interval], pearson_score[interval]]):
            scores.append(float("NaN"))
        elif any(x <= 0 for x in [spearman_score[interval], pearson_score[interval]]):
            scores.append(0)
        else:
            scores.append(hmean([spearman_score[interval], pearson_score[interval]]))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: commonsense/conceptnet5
Commit Name: 2999e509688a82f8be65600727a5922b5739822b
Time: 2017-03-08
Author: joanna.teresa.duda@gmail.com
File Name: conceptnet5/vectors/evaluation/wordsim.py
Class Name:
Method Name: compute_semeval_score


Project Name: pytorch/text
Commit Name: 41bd713df7a4187dd0f42bbb9ffcac2ba126adbb
Time: 2020-06-16
Author: nayef.ahmed211@gmail.com
File Name: torchtext/experimental/vectors.py
Class Name: Vectors
Method Name: __init__


Project Name: probcomp/bayeslite
Commit Name: 7f6cd7f219c8c7f77b8e49e92f26ffae9229d698
Time: 2016-03-16
Author: riastradh+probcomp@csail.mit.edu
File Name: src/math_util.py
Class Name:
Method Name: logsumexp