为什么当我的测试文件包含 135 时,模型的 FastText 测试 return 只有 1 个示例
Why FastText test of a model return only 1 exemple when my test file contains 135
我正在尝试测试我在测试文件 (test.txt) 上使用 fastText 制作的模型 (model.bin)。在这个测试文件中,我有 135 个标签数据。我期待 fastText 在这个数量的例子上测试我的模型,但相反,它只测试了 1 个例子。这个问题从何而来?
我已经尝试用另一个模型和另一个测试文件来做这样的事情并且一切都很好。
这就是我测试模型的方式。 model_baby.bin是模型,test.data.txt是我的测试文件。
./fasttext test model_baby.bin test.data.txt
N 1
P@1 1
R@1 0.0164
Number of examples: 1
这是我的测试文件的摘录
__label__4.0 I love the fact you can hide your stuff. Only down is that the straps to hold it at midpoint and bottom could be better designed for your car. It's got plenty of room which is great. __label__5.0 This hid our ipad wonderfully. Especially for those quick stops where we all had jump out and use the restroom. It zipped, folded and held all our stuff for the kids in the back seat. __label__3.0
因为我的测试文件中有超过 1 个带标签的示例,我希望输出 "Number of examples: " 至少大于 1,但实际的是“1”
来自官方文档(https://fasttext.cc/docs/en/supervised-tutorial.html):文本文件的每一行都包含一个标签列表,后面是相应的文档。所有标签都以 __label__ 前缀开头,这就是 fastText 识别什么是标签或什么是单词的方式。
我不太明白你的摘录。我觉得应该是这样的:
__label__4.0 I love the fact you can hide your stuff. Only down is that the straps to hold it at midpoint and bottom could be better designed for your car. It's got plenty of room which is great.
__label__5.0 This hid our ipad wonderfully. Especially for those quick stops where we all had jump out and use the restroom. It zipped, folded and held all our stuff for the kids in the back seat.
__label__3.0 ...
我正在尝试测试我在测试文件 (test.txt) 上使用 fastText 制作的模型 (model.bin)。在这个测试文件中,我有 135 个标签数据。我期待 fastText 在这个数量的例子上测试我的模型,但相反,它只测试了 1 个例子。这个问题从何而来?
我已经尝试用另一个模型和另一个测试文件来做这样的事情并且一切都很好。
这就是我测试模型的方式。 model_baby.bin是模型,test.data.txt是我的测试文件。
./fasttext test model_baby.bin test.data.txt
N 1
P@1 1
R@1 0.0164
Number of examples: 1
这是我的测试文件的摘录
__label__4.0 I love the fact you can hide your stuff. Only down is that the straps to hold it at midpoint and bottom could be better designed for your car. It's got plenty of room which is great. __label__5.0 This hid our ipad wonderfully. Especially for those quick stops where we all had jump out and use the restroom. It zipped, folded and held all our stuff for the kids in the back seat. __label__3.0
因为我的测试文件中有超过 1 个带标签的示例,我希望输出 "Number of examples: " 至少大于 1,但实际的是“1”
来自官方文档(https://fasttext.cc/docs/en/supervised-tutorial.html):文本文件的每一行都包含一个标签列表,后面是相应的文档。所有标签都以 __label__ 前缀开头,这就是 fastText 识别什么是标签或什么是单词的方式。
我不太明白你的摘录。我觉得应该是这样的:
__label__4.0 I love the fact you can hide your stuff. Only down is that the straps to hold it at midpoint and bottom could be better designed for your car. It's got plenty of room which is great.
__label__5.0 This hid our ipad wonderfully. Especially for those quick stops where we all had jump out and use the restroom. It zipped, folded and held all our stuff for the kids in the back seat.
__label__3.0 ...