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달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠