"Overflow encountered in exp" while using textcat_multilabel #8049
-
Hi ! When I train the textcal model using Message example:
Summary on data:
Some additional environment informations: Thanks in advance for your response ! :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 9 replies
-
So you're using textcat_multilabel but you only have one label. Do you expect to only have one label? If you have a category and you want to label whether documents are in it or not, you should use normal (non-multilabel) text cat, and label documents as positive or negative (so you have two labels). Some frameworks or libraries will handle that differently, but spaCy requires that to avoid creating a special case for binary classification. Additionally, the label NEGATION is a little weird. I wouldn't typically expect that to apply to a single document - it's more something that would be applicable to a span in a document or something. Can you give some examples of your data and what you're trying to do? I realize these sounds like high-level questions in response to a low-level error, but the textcat models are designed to choose from multiple labels, so having only one won't work and seeing math-related issues isn't terribly surprising. |
Beta Was this translation helpful? Give feedback.
So you're using textcat_multilabel but you only have one label. Do you expect to only have one label?
If you have a category and you want to label whether documents are in it or not, you should use normal (non-multilabel) text cat, and label documents as positive or negative (so you have two labels). Some frameworks or libraries will handle that differently, but spaCy requires that to avoid creating a special case for binary classification.
Additionally, the label NEGATION is a little weird. I wouldn't typically expect that to apply to a single document - it's more something that would be applicable to a span in a document or something. Can you give some examples of your data and what you…