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

Is there a way to get the accuracy of this chatterBot #459

Closed
csrgxtu opened this issue Dec 3, 2016 · 6 comments
Closed

Is there a way to get the accuracy of this chatterBot #459

csrgxtu opened this issue Dec 3, 2016 · 6 comments
Labels

Comments

@csrgxtu
Copy link

csrgxtu commented Dec 3, 2016

In Machine Learning area, there always a test data set used for get the accuracy of the model, so, is there any similiar thing for ChatterBot?

@gunthercox
Copy link
Owner

gunthercox commented Dec 3, 2016

ChatterBot uses logic adapters, which are essentially just modules that take input and return a response. Each response that is returned has a confidence value associated with it. The confidence value is a numeric indicator of how accurate the logic adapter thinks the response is.

A confidence score is kind of a metric for accuracy but it probably better reflects the breadth of a particular bot's knowledge than the accuracy of it's responses. Arguably a chat bot that responds more confidently may also be more accurate, but that is based on the assumption that the set of logic adapters the bot uses are all completely accurate in their ability to judge the precision of the response they generate.

Because ChatterBot's logic adapters each encompass a modular process for selecting a response, there isn't necessarily a common way to gauge the accuracy of all of them. On an individual basis this might be possible but I don't have anything in the code base right now for doing a full evaluation of accuracy.

Please let me know if I can clarify anything.

@kennetham
Copy link

@gunthercox how do I get the confidence level from get_response? Is there any way to get the confidence level from a statement?

@gunthercox
Copy link
Owner

Currently get_response does not return the confidence value. I can see how this would be useful and I would be happy to add it as a feature in one of the upcoming releases of ChatterBot.

@kennetham
Copy link

Cool. I am using a quick and dirty method now, I'm not sure if it was meant to be used this way.

from chatterbot.conversation import Statement
# initialization
...

statement = Statement(message)
confidence_level = bot.logic.process(statement)[0]
response = bot.logic.process(statement)[1].text

@gunthercox
Copy link
Owner

Hi @csrgxtu I've opened #565 which makes a change so that the confidence score can be accessed on the returned statement object. (response.confidence)

@lock
Copy link

lock bot commented Mar 10, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants