2999e509688a82f8be65600727a5922b5739822b,conceptnet5/vectors/evaluation/wordsim.py,,compute_semeval_score,#,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
and a Spearman correlation coefficient.
intervals = ["acc", "low", "high"]
scores = []
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]]))
return pd.Series(
scores,
index=intervals
)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
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: danforthcenter/plantcv
Commit Name: 21e6d8d6a5452ca96cecb00f8a9083de14a947c4
Time: 2019-10-23
Author: haleyschuhl@gmail.com
File Name: plantcv/plantcv/hyperspectral/analyze_spectral.py
Class Name:
Method Name: analyze_spectral
Project Name: rasbt/mlxtend
Commit Name: cec517350d259a4f49a58a769db784c248cfffa8
Time: 2021-01-08
Author: mail@sebastianraschka.com
File Name: mlxtend/evaluate/accuracy.py
Class Name:
Method Name: accuracy_score