使用 FastText 进行多标签分类
我想知道 FastText 是否能够处理多标签数据?有人可以分享一个简单的例子和混淆矩阵(真实标签与预测标签)吗?我已经查看了 FastText 文档页面。
先感谢您
I was wondering if FastText is able to deal with multi-labelled data? Could someone share a simple example along with a confusion matrix (true vs predicted labels)? I have already taken a look at FastText documentation page.
Thank you in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
本节介绍多标签分类:
https://github.com/ facebookresearch/fastText/blob/main/docs/supervised-tutorial.md#multi-label-classification
准备训练数据
这已在本节末尾进行了描述安装 fastText
This section describes multi label classification:
https://github.com/facebookresearch/fastText/blob/main/docs/supervised-tutorial.md#multi-label-classification
Preparing training data
That has been described at the end of the section Installing fastText
文档,&提供标签文本的格式似乎只提到每个文本一个标签。
您可以尝试在训练数据中多次重复相同的文本,每次都使用适当的标签之一。 (您可能需要重新整理训练数据,以便此类重复的文本不会直接彼此并排出现。)
The docs, & the format for supplying labeled text, only seem to mention a single label per text.
You could try repeating the same text more than once in your training data, each time with one of the appropriate labels. (You might want to re-shuffle the training data so that such repeated texts don't appear directly alongside each other.)