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
asked 2 months ago167 views
2 Answers
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
SUPPORT ENGINEER
answered 2 months ago
  • 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
answered 2 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions