If only two labels are provided to textcat, a warning is issued: "âš If the textcat component is a binary classifier with exclusive classes, provide '--textcat_positive_label' for an evaluation on the positive class."
This should be "...provide '--textcat-positive-label'..." rather than "...provide '--textcat_positive_label'..."
If --textcat_positive_label is provided to train, this will result in the following error: "spacy train: error: unrecognized arguments: --textcat_positive_label khabar".
Accordingly, I suggest the warning message is changed.
I suggest the following modification to train.py (lines 364 to 368):
msg.warn(
"If the textcat component is a binary classifier with "
"exclusive classes, provide '--textcat-positive-label' for "
"an evaluation on the positive class."
)
Yep, you're right, that should be changed. Do you feel like contributing the PR?
@svlandeg, sure. I'll get on it :)
@svlandeg Here is the pull request: https://github.com/explosion/spaCy/pull/5284. I don't know to link it, so I'm just passing along the url.
Great! Actually, in the PR you can write Fixes #5283 (without the back quotes) and then they will be automatically linked, and this issue would close once we merge the PR :-)
PR merged, thanks again! Will be fixed from spaCy 2.3 onwards.
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.