IBM Watson NLU给出了“培训验证”失败。标签类别的样本太少。至少需要5个错误

发布于 2025-01-27 07:33:20 字数 1009 浏览 5 评论 0 原文

我正在尝试在IBM Watson NLU中训练我的模型。我必须将电子邮件分类为2个标签。该实例已经创建,我也传递了正确的模型ID。

 model_id = model['model_id']
 model_to_view = nlu.get_classifications_model(model_id=model_id).get_result()
    
 print("Information about the created NLU Classifications model:")
 print(json.dumps(model_to_view, indent=2))

培训状态最初显示为“开始”,但此后显示以下提到的错误:

Information about the created NLU Classifications model:
{
  "name": "MyClassificationsModel1",
  "user_metadata": null,
  "language": "en",
  "description": null,
  "model_version": "1.0.1",
  "version": "1.0.1",
  "workspace_id": null,
  "version_description": null,
  "status": "error",
  "notices": [
    {
      "message": "Training data validation failed: Too few examples for label class. Minimum of 5 required"
    }
  ],
"model_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
"features": [
    "classifications"
  ],
  "created": "2022-04-28T12:03:23Z",
  "last_trained": "2022-04-28T12:03:23Z",
  "last_deployed": null
}

I am trying to train my model in IBM Watson NLU. I have to classify emails into 2 labels. The instance has been created and I am passing the correct Model ID too.

 model_id = model['model_id']
 model_to_view = nlu.get_classifications_model(model_id=model_id).get_result()
    
 print("Information about the created NLU Classifications model:")
 print(json.dumps(model_to_view, indent=2))

The training status shows as 'started' initially, but after that it shows the below mentioned error:

Information about the created NLU Classifications model:
{
  "name": "MyClassificationsModel1",
  "user_metadata": null,
  "language": "en",
  "description": null,
  "model_version": "1.0.1",
  "version": "1.0.1",
  "workspace_id": null,
  "version_description": null,
  "status": "error",
  "notices": [
    {
      "message": "Training data validation failed: Too few examples for label class. Minimum of 5 required"
    }
  ],
"model_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
"features": [
    "classifications"
  ],
  "created": "2022-04-28T12:03:23Z",
  "last_trained": "2022-04-28T12:03:23Z",
  "last_deployed": null
}

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

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

发布评论

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

评论(1

故乡的云 2025-02-03 07:33:20

您的培训数据需要为每个分类标签提供5个样本。参见

用于分类培训数据要求。如果您有2个标签,则至少应有10(5个)样品。

Your training data needs to provide 5 samples for each classification label. See

https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-classifications#classification-training-data-requirements

for classifications training data requirements. If you have 2 labels, there should be a minimum of 10 (5 each) samples.

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