Do all the returned categories of content classification have a confidence higher than 0.5?

24 views
Skip to first unread message

Xilin Song

unread,
Apr 1, 2021, 4:35:10 AM4/1/21
to cloud-nl-discuss
Dear scientists,
I am using the content classification API on my own contexts.
Following the example on https://cloud.google.com/natural-language/docs/classifying-text, I was able to get the categories and the corresponding confidence on each text.
However, I found that all the returned categories have a confidence that is no smaller than 0.5. I was wondering if this is because the "less-confident" categories are omitted or if they are not counted as categories at all.
If they are omitted, is there any chance that I can get those less-confident categories?

Many thanks,
Daniel

tielve

unread,
Apr 7, 2021, 11:57:11 AM4/7/21
to cloud-nl-discuss
Hello,

I believe that the default threshold of the Natural Language API is indeed 0.5, which is the usual. So beneath that threshold, the categories are omitted. Probably because for large texts, the response could end up being very large.
AFAIK, there is no option to set the threshold for the Natural Language API text classification. You could create a feature request for it, though.

Kind Regards,
Kevin

Reply all
Reply to author
Forward
0 new messages