Why do I only get 3 classes in the inference results of AWS Comprehend Custom Classification

0

I trained a custom Multi-label classifier and created an endpoint for it. There are more than 20 classes all together. However, invoking the classifier I only ever get 3 classes / labels and their respective probabilities back in the result.

  response = comprehend.classify_document(Text=text, EndpointArn=arn)

response['Labels'] is always of length 3 (i assume the 3 best scoring labels).

Is there a way to get back all the labels and their probabilities ?

jan
已提問 3 個月前檢視次數 178 次
2 個答案
1

Hello !

Please note that when we create a custom classifier for multi class, the custom comprehend model will detect only 3 top classes along with the scores.

Unfortunately, Comprehend does not have any feature as of now to allow the users to select the number of classes that we want to be detected for each file.

AWS
支援工程師
已回答 3 個月前
  • That's unfortunate, thanks for answering.

0

Actually i just got back a result with 4 classes (out of 32 possible classes) for the first time .. so it's not the top 3 classes after all .. How is the result determined then?

jan
已回答 3 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南