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

Spacy Scikit-learn Multithreaded Training Prediction Issue #150

Closed
azzuwan opened this issue Feb 10, 2017 · 4 comments
Closed

Spacy Scikit-learn Multithreaded Training Prediction Issue #150

azzuwan opened this issue Feb 10, 2017 · 4 comments

Comments

@azzuwan
Copy link

azzuwan commented Feb 10, 2017

I'm using the multithreaded-training branch and when I run:
python -m rasa_nlu.train -c config.json -t 3
I get this:
/usr/local/lib/python2.7/dist-packages/sklearn/metrics/classification.py:1113: UndefinedMetricWarning: F-score is ill-defined and being set to 0.0 in labels with no predicted samples. 'precision', 'predicted', average, warn_for)
spacyscikit-multithreaded-problem

@amn41
Copy link
Contributor

amn41 commented Feb 10, 2017

TL;DR this isn't an error but I would recommend you add more training data.

The model still trains and runs correctly I presume? The warning you see is actually related to how the training data is used & can also occur with 1 thread.

Let's say you have 2 intents. Part of the f-score is the number of examples correctly predicted to be each intent. If you have very few training examples for, say, intent_1, then when your data is split into training and test sets it can happen that your test set doesn't have any examples of intent_1. That means the f-score isn't defined & scikit-learn has to fall back on a default.

@amn41 amn41 closed this as completed Feb 10, 2017
@azzuwan
Copy link
Author

azzuwan commented Feb 10, 2017

That explains it thoroughly. Thank you Alan.

@vduckute1812
Copy link

Thank you very much amn41 👍

@ugarciac
Copy link

ugarciac commented Dec 13, 2018

hello I have the same problem and I have not been able to solve it
I have
training 1277 objects
test 15000 objects
If I use accuracy or f1_micro, it works for me, how can it be solved, the same thing happens to me if I use a perceptron, HELP!

taytzehao pushed a commit to taytzehao/rasa that referenced this issue Jul 14, 2023
Tawakalt pushed a commit that referenced this issue Jan 2, 2024
* prevent race condition in poetry build

* update makefile
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

4 participants