# Train binary textcat in Prodigy Nightly

**URL:** <https://support.prodi.gy/t/train-binary-textcat-in-prodigy-nightly/4451>\
**Category:** Uncategorized\
**Tags:** nightly, done, textcat\
**Created:** [July 17, 2021, 2:37am UTC](https://support.prodi.gy/t/train-binary-textcat-in-prodigy-nightly/4451 "2021-07-17T02:37:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lifan](https://avatars.discourse-cdn.com/v4/letter/l/d2c977/32.png) [@lifan](https://support.prodi.gy/u/lifan)\
**Post date:** [July 17, 2021, 2:37am UTC](https://support.prodi.gy/t/train-binary-textcat-in-prodigy-nightly/4451/1 "2021-07-17T02:37:26Z")

</div>

Hello community, I am new to Prodigy and currently I am using the nightly version.

I can't figure out how to train a textcat model with binary label ([https://prodi.gy/docs/text-classification#manual-binary](https://prodi.gy/docs/text-classification#manual-binary)). The score is always zero. If I use two labels (Yes/No) in annotation, the training will proceed correctly.

I feel I must have missed something obvious. Thanks for your help!

```python
============================= Training pipeline =============================
Components: textcat
Merging training and evaluation data for 1 components
  - [textcat] Training: 20 | Evaluation: 4 (20% split)
Training: 20 | Evaluation: 4
Labels: textcat (1)
ℹ Pipeline: []
ℹ Initial learn rate: 0.001
E # SCORE
--- ------ ------
  0 0 0.00
141 200 0.00
341 400 0.00
541 600 0.00
741 800 0.00
941 1000 0.00
1141 1200 0.00
1341 1400 0.00
1541 1600 0.00

```

---

<div class="post-metadata">

**Author:** ![ines](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/ines/32/3_2.png) [@ines](https://support.prodi.gy/u/ines)\
**Post date:** [July 18, 2021, 2:51am UTC](https://support.prodi.gy/t/train-binary-textcat-in-prodigy-nightly/4451/2 "2021-07-18T02:51:44Z")

</div>

Hi! The problem here is that the `textcat` component in spaCy v3 expects at least 2 labels for binary categories (e.g. `LABEL` and `NOT_LABEL`). If you're training a pipeline with only one label, you can use the `textcat_multilabel` component instead.

We have a new version of the v1.11 coming that introduces a `--textcat-multilabel` option for training binary classifiers. In the meantime, you could just export your data with `data-to-spacy` and then train with a config using `textcat_multilabel` instead of `textcat`.

---

<div class="post-metadata">

**Author:** ![lifan](https://avatars.discourse-cdn.com/v4/letter/l/d2c977/32.png) [@lifan](https://support.prodi.gy/u/lifan)\
**Post date:** [July 19, 2021, 3:18am UTC](https://support.prodi.gy/t/train-binary-textcat-in-prodigy-nightly/4451/3 "2021-07-19T03:18:19Z")

</div>

Thanks for the clarification! I am using the `data-to-spacy` approach now.

---

<div class="post-metadata">

**Author:** ![ines](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/ines/32/3_2.png) [@ines](https://support.prodi.gy/u/ines)\
**Post date:** [July 19, 2021, 8:22am UTC](https://support.prodi.gy/t/train-binary-textcat-in-prodigy-nightly/4451/4 "2021-07-19T08:22:30Z")

</div>

Just released a new update to the nightly that now lets you provide `--textcat-multilabel` datasets separately 🙂

> [@sparkles Prodigy nightly: spaCy v3 support, UI for overlapping spans & more](https://support.prodi.gy/t/prodigy-nightly-spacy-v3-support-ui-for-overlapping-spans-more/3861/85):
>
> Just released a new nightly v1.11.0a10 that includes the following updates: improved support for updating from binary annotations, especially those created with ner.teach ner.teach will now also ask about texts with no entities – so if a suggestion doesn't include any suggestions, you can accept it if it has no entities and reject it if it does contain entities of the given label(s) support for providing --spancat datasets for training spaCy v3.1's new SpanCategorizer in spacy train (with au…
