【问题标题】:What Metrics Are Used in the Output of Gensim's evaluate_word_pairs?Gensim 的 evaluate_word_pairs 的输出中使用了哪些指标?
【发布时间】:2021-06-17 17:16:19
【问题描述】:

Gensim 为evaluating semantic similarity 提供evaluate_word_pairs 函数。

以下是其页面中的示例:

model.wv.evaluate_word_pairs(datapath('wordsim353.tsv'))

Out:
((0.1014236962315867, 0.44065378924434523), SpearmanrResult(correlation=0.07441989763914543, pvalue=0.5719973648460552), 83.0028328611898)

我想知道输出中的每个值(0.1014236962315867、0.44065378924434523、...)使用什么指标生成?

【问题讨论】:

    标签: gensim word2vec similarity


    【解决方案1】:

    根据documentation for evaluate_word_pairs()

    退货

    • pearson (tuple of (float, float)) - 具有 2 尾 p 值的 Pearson 相关系数。
    • spearman (tuple of (float, float)) - 来自数据集的相似性与模型本身产生的相似性之间的 Spearman 秩相关系数,具有 2 尾p 值。
    • oov_ratio (float) - 与未知单词配对的比例。

    根据您的输出,看起来 Pearson 结果仍然只是一个普通元组,而 Spearman 结果已报告为命名元组。但在每种情况下,相关系数似乎都是第一个,然后是 p 值。

    请注意,oov_ratio 报告为模型不知道的测试词的百分比

    有关PearsonSpearman 系数/p 值的定义/解释,请参阅其他参考资料。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-01-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多