Skip to content

RD-2360 deprecate numCategories, add singleLabel, scoreThreshold opti…#131

Merged
jkho merged 9 commits intorosette-api:masterfrom
iredpath:RD-2360-multilabel-tcat
Aug 7, 2018
Merged

RD-2360 deprecate numCategories, add singleLabel, scoreThreshold opti…#131
jkho merged 9 commits intorosette-api:masterfrom
iredpath:RD-2360-multilabel-tcat

Conversation

@iredpath
Copy link
Copy Markdown
Contributor

…ons for categories, add raw score to tcat response object

@iredpath
Copy link
Copy Markdown
Contributor Author

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;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's box this per our convention. If both this and threshold are set, who wins?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So not merging yet?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

got the okay from Hannah, so we're sticking with these changes. Just waiting on the verification.

@jkho jkho merged commit eb25416 into rosette-api:master Aug 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants