Skip to content

Classification.confidence as a float not a list#110

Merged
mkozakov merged 6 commits intomainfrom
confidence-score
Oct 19, 2022
Merged

Classification.confidence as a float not a list#110
mkozakov merged 6 commits intomainfrom
confidence-score

Conversation

@mkozakov
Copy link
Copy Markdown
Collaborator

@mkozakov mkozakov commented Oct 19, 2022

Before:

res = co.classify(...)
res.classifications[0].confidence # [ Confidence(label: __, confidence: 0.8), Confidence(label: __, confidence: ___), ...)

After

res = co.classify(...)
res.classifications[0].confidence # 0.8

@mkozakov mkozakov changed the title Confidence score Classification.confidence as a float not a list Oct 19, 2022
@mkozakov mkozakov requested a review from lfayoux October 19, 2022 13:28
@lfayoux
Copy link
Copy Markdown
Contributor

lfayoux commented Oct 19, 2022

@mkozakov How do you feel about changing the return type of classify to Classifications to List[Classification]. So instead of

res = co.classify(...)
res.classifications[0].confidence # 0.8

It would be

res = co.classify(...)
res[0].confidence # 0.8

@mkozakov
Copy link
Copy Markdown
Collaborator Author

I feel great about it - Aidan already has this change in PR

@mkozakov mkozakov merged commit 808dee1 into main Oct 19, 2022
@mkozakov mkozakov deleted the confidence-score branch October 19, 2022 14:29
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.

2 participants