Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normalise score #45

Open
UtterDonkey opened this issue May 19, 2024 · 0 comments
Open

Normalise score #45

UtterDonkey opened this issue May 19, 2024 · 0 comments

Comments

@UtterDonkey
Copy link

UtterDonkey commented May 19, 2024

After running this on many different pieces of text, I got no score lower than 0.7106113. So naturally it would make sense to assume that the output is between 0.7 and 1. If the score were calculated by Math.max((vector.score - 0.7) / 0.3, 0), the score would be a number between 0 and 1, and a threshold of 0.85 using the original formula would be 0.5 (50%) using this adaptation, which makes more sense. The score is also clamped at 0, so if somehow the score was less than 0.7, the score outputted would never be negative.
If you wanted 50% to be equivalent to the current 86% threshold, you would do Math.max((vector.score - 0.72) / 0.28, 0).

It may be useful to return this in a normalizedScore / normalisedScore from the API so as to not break anything currently using the score property.

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

No branches or pull requests

1 participant