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

[Question]: Confidence threshold for predicting entities in NER - any parameters that can be used? #3575

Open
pganesh opened this issue Dec 3, 2024 · 2 comments
Labels
question Further information is requested

Comments

@pganesh
Copy link

pganesh commented Dec 3, 2024

Question

Hi, I am training models with custom entities - and I was wondering if I can get the "confidence" level when it did not correctly predict an expected entity. When it does predict the entity, it seems to come up with a confidence level (e.g. .993424 etc.) so I was hoping I can tweak or set a confidence level to say .85 and above so it predicts the entity instead of being unrecognized

@pganesh pganesh added the question Further information is requested label Dec 3, 2024
@helpmefindaname
Copy link
Collaborator

Hi @pganesh
I don't think that is easy to do.
The way the viterbi algorithm works, you get only the most likely sequence out. If you want to score an entity-candidate that is not part of the most likely sequence, you'd have to do some different calculations. You can do this, by calling tagger.predict(..., force_token_predictions=True) and then use the scores to calculate everything on your own, but I am not sure what the exact formula for this would be.

@pganesh
Copy link
Author

pganesh commented Dec 7, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants