RD-2360 deprecate numCategories, add singleLabel, scoreThreshold opti…#131
RD-2360 deprecate numCategories, add singleLabel, scoreThreshold opti…#131jkho merged 9 commits intorosette-api:masterfrom
Conversation
…ons for categories, add raw score to tcat response object
|
we'll ultimately want version 1.10.104 here, so let's wait until #130 gets merged to master (and subsequently merged into this branch) before releasing |
| * Single label mode will return only the highest scoring category | ||
| * @return whether or not we are in single label mode | ||
| */ | ||
| private final boolean singleLabel; |
There was a problem hiding this comment.
Let's box this per our convention. If both this and threshold are set, who wins?
There was a problem hiding this comment.
threshold wins with respect to the threshold value itself, but we will still only return a maximum of one result if both are set
| * can be any real number. | ||
| * @return the score threshold | ||
| */ | ||
| private final Float scoreThreshold; |
There was a problem hiding this comment.
maybe worthwhile to clarify that the threshold will be ignored if singleLabel is true, especially if the single label score falls below the threshold? or did I interpret it wrong?
There was a problem hiding this comment.
turning on singleLabel automatically sets scoreThreshold to -INF, but this will get overridden if scoreThreshold is also specified. I'll add a clarifying note to singleLabel that the highest scoring category gets returned regardless of score (although after talking to Hannah we may hold off on exposing the raw score altogether, so this may all be moot)
There was a problem hiding this comment.
got the okay from Hannah, so we're sticking with these changes. Just waiting on the verification.
…ons for categories, add raw score to tcat response object