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

DIETClassifier adds a confidence value to entity predictions #6038

Merged
merged 10 commits into from
Jun 17, 2020

Conversation

tabergma
Copy link
Contributor

@tabergma tabergma commented Jun 17, 2020

Proposed changes:

  • Update the CRF to return scores that can be used as confidence values.
  • DIETClassifier now adds a confidence value to entity predictions.

closes #5481

(Will also make a PR to tensorflow addons directly. If they take the changes and adapt the CRF, we can remove our custom CRF again.)

Status (please check what you already did):

  • added some tests for the functionality
  • updated the documentation
  • updated the changelog (please check changelog for instructions)
  • reformat files using black (please check Readme for instructions)

@tabergma tabergma requested a review from Ghostvv June 17, 2020 08:37
@tabergma
Copy link
Contributor Author

Tensorflow Addons PR: tensorflow/addons#1935

rasa/nlu/classifiers/diet_classifier.py Show resolved Hide resolved
rasa/utils/tensorflow/crf.py Show resolved Hide resolved
rasa/utils/tensorflow/crf.py Show resolved Hide resolved
rasa/utils/tensorflow/crf.py Outdated Show resolved Hide resolved
rasa/utils/tensorflow/crf.py Outdated Show resolved Hide resolved
rasa/utils/tensorflow/crf.py Show resolved Hide resolved
rasa/utils/tensorflow/crf.py Show resolved Hide resolved
rasa/utils/tensorflow/crf.py Outdated Show resolved Hide resolved
rasa/utils/tensorflow/crf.py Outdated Show resolved Hide resolved
@Ghostvv
Copy link
Contributor

Ghostvv commented Jun 17, 2020

@tabergma could you please apply my comments to tf addons PR as well

@tabergma tabergma merged commit 923db75 into master Jun 17, 2020
@tabergma tabergma deleted the diet-entity-confidence branch June 17, 2020 13:08
@vish0701
Copy link

vish0701 commented Jul 8, 2020

This is a good feature to add. However, current rasa documentation at https://rasa.com/docs/rasa/nlu/entity-extraction/#entity-extraction-custom-features says
image

Does the documentation need to be updated to indicate that now DIET returns a confidence value?

@tabergma
Copy link
Contributor Author

tabergma commented Jul 8, 2020

@vish0701 The feature is not yet released. It is merged into master and we also updated the documentation. Once we do the next release from master, you will have the confidence value for entities coming from the DIETClassifier and the documentation will be updated as well.

@aminekechaou
Copy link

Was this already included in a release? From my understanding it is not in 1.10.14.

@tabergma
Copy link
Contributor Author

tabergma commented Oct 7, 2020

This will be included in the Rasa 2.0 release, which should happen any day now.

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.

Add confidence to entities in DIETClassifier
4 participants