fastText 中的精确度和召回率?

HAO*_*HEN 5 precision nlp classification fasttext

我实现了用于文本分类的 fastText,链接https://github.com/facebookresearch/fastText/blob/master/tutorials/supervised-learning.md 我想知道 precision@1 或 P@5 是什么意思?我做了二元分类,但我测试了不同的数字,我不明白结果:

haos-mbp:fastText hao$ ./fasttext test trainmodel.bin train.valid 2
N   312
P@2 0.5
R@2 1
Number of examples: 312
haos-mbp:fastText hao$ ./fasttext test trainmodel.bin train.valid 1
N   312
P@1 0.712
R@1 0.712
Number of examples: 312
haos-mbp:fastText hao$ ./fasttext test trainmodel.bin train.valid 3
N   312
P@3 0.333
R@3 1
Number of examples: 312
Run Code Online (Sandbox Code Playgroud)

Kar*_*yan 4

精度是相关结果数与程序检索到的结果总数的比率。假设一个文档搜索引擎检索到 100 个文档,其中 90 个与查询相关,则精度为 90 / 100 (0.9)。由于我们已经用 100 个结果计算了精​​度,因此这是 P@100。

召回率是算法检索到的相关结果与所有相关结果总数的比率。与上面的示例相同,如果相关文档的总数为 110,则召回率为 90 / 110。

简而言之,召回率有助于评估信息检索程序在获取相关结果方面的完整性;精度有助于评估结果的准确性。

请检查 fasttext 中的二进制分类,https://github.com/facebookresearch/fastText/issues/93