如何使顶点AI多标签分类automl不忽略没有标签的文本?

发布于 2025-02-08 21:27:38 字数 1447 浏览 3 评论 0原文

我准备了一个按照文档

我的上传文件看起来

{
  "textContent": "This text corresponds to 2 labels",
  "classificationAnnotations": [
    {"displayName": "LABEL_1"},
    {"displayName": "LABEL_2"}
  ]
}
{
  "textContent": "This text doesn't correspond to any labels",
  "classificationAnnotations": []
}
// ... and other 5,853 lines

只有1,037个文本具有非空的标签列表。

其他文本被视为“未标记”。 Automl忽略了未标记的文本。

作为解决方法,我在每个文本中添加了一个额外的标签,

{
  "textContent": "This text corresponds to 2 labels",
  "classificationAnnotations": [
    {"displayName": "LABEL_1"},
    {"displayName": "LABEL_2"},
    {"displayName": "EXTRA_LABEL"}
  ]
}
{
  "textContent": "This text doesn't correspond to any labels",
  "classificationAnnotations": [
    {"displayName": "EXTRA_LABEL"}
  ]
}
// ... and other 5,853 texts

是否有一种方法可以使自动使用“未标记”文本作为带有0个标签的文本?

I prepared a training dataset for multi-label classification in JSON Lines format as described in docs.

My upload file looks like

{
  "textContent": "This text corresponds to 2 labels",
  "classificationAnnotations": [
    {"displayName": "LABEL_1"},
    {"displayName": "LABEL_2"}
  ]
}
{
  "textContent": "This text doesn't correspond to any labels",
  "classificationAnnotations": []
}
// ... and other 5,853 lines

Only 1,037 texts have non-empty list of labels.

Training dataset labels

Other texts are considered "Unlabeled". AutoML ignores unlabeled texts.

AutoML training result

As a workaround I added an extra label to every text

{
  "textContent": "This text corresponds to 2 labels",
  "classificationAnnotations": [
    {"displayName": "LABEL_1"},
    {"displayName": "LABEL_2"},
    {"displayName": "EXTRA_LABEL"}
  ]
}
{
  "textContent": "This text doesn't correspond to any labels",
  "classificationAnnotations": [
    {"displayName": "EXTRA_LABEL"}
  ]
}
// ... and other 5,853 texts

Is there a way to make AutoML use "Unlabeled" texts as texts with 0 labels?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

并安 2025-02-15 21:27:38

我们经常将未标记的文本放入全零矢量进行培训。我认为,目前无法在Automl中完成这一点。

We often put the unlabeled text to an all-zero vector for training. This can't be done in Automl for now, I think.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文