# Is bath training on labels mutually exclusive?

**URL:** <https://support.prodi.gy/t/is-bath-training-on-labels-mutually-exclusive/1397>\
**Category:** Uncategorized\
**Tags:** usage, textcat, done, spacy\
**Created:** [April 15, 2019, 7:59am UTC](https://support.prodi.gy/t/is-bath-training-on-labels-mutually-exclusive/1397 "2019-04-15T07:59:31Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![bigbeaker](https://avatars.discourse-cdn.com/v4/letter/b/7feea3/32.png) [@bigbeaker](https://support.prodi.gy/u/bigbeaker)\
**Post date:** [April 15, 2019, 7:59am UTC](https://support.prodi.gy/t/is-bath-training-on-labels-mutually-exclusive/1397/1 "2019-04-15T07:59:31Z")

</div>

I have a dataset with multiple labels which I have annotated.  
When I run textcat.batch train - would I expect the performance of my labels to be the same as training on a data set with just a single label?

For example  
dataset A 2 labels: HOTDOG & NOTHOTDOG  
dataset B: 1 label HOTDOG  
dataset C 1 label NOTHOTDOG

would running:  
textcat.batchtrain model datasetA have the same performance as training 2 separate models on datasets B & C and combining their outputs?

For separate textcat.batch labels is each label trained separately? or is there any ‘leak’

Currently working on comparing these empirically - but some insight and tips would be great

---

<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:** [April 15, 2019, 8:41am UTC](https://support.prodi.gy/t/is-bath-training-on-labels-mutually-exclusive/1397/2 "2019-04-15T08:41:59Z")

</div>

Hi! The built-in `textcat` recipes use spaCy’s text classifier implementation, which currently expects the labels to be **not** mutually exclusive. So in theory, an example could be both hotdog and not hotdog. Of course, for a binary classification task like your example, this should be easy to work around by annotating and training only one label, `HOTDOG`.

spaCy v2.1 introduced the option to make the labels mutually exclusive – so in the next update of Prodigy, you’ll be able to specify this when you annotate and train a model. Depending on what you want to do, you might also find that a different text classification implementation just works better on your problem. In that case, you can export the data from Prodigy and train your model separately, or plug it in via a custom recipe to annotate with a model in the loop. Just make sure your model implementation is sensitive enough to updates.

---

<div class="post-metadata">

**Author:** ![bigbeaker](https://avatars.discourse-cdn.com/v4/letter/b/7feea3/32.png) [@bigbeaker](https://support.prodi.gy/u/bigbeaker)\
**Post date:** [April 15, 2019, 8:45am UTC](https://support.prodi.gy/t/is-bath-training-on-labels-mutually-exclusive/1397/3 "2019-04-15T08:45:13Z")

</div>

`pgy textcat.batch-train HOTDOG models --label 'POS'`

Okay great thanks for clarifying  
Was just going through the docs again, does adding the label flag to batch-train override this behaviour in the current version?

Like so:  
`pgy textcat.batch-train data models --label 'label'`

---

<div class="post-metadata">

**Author:** ![gladiator](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/gladiator/32/766_2.png) [@gladiator](https://support.prodi.gy/u/gladiator)\
**Post date:** [July 4, 2019, 4:41pm UTC](https://support.prodi.gy/t/is-bath-training-on-labels-mutually-exclusive/1397/4 "2019-07-04T16:41:01Z")

</div>

Hi, Do you have an update or an expected date when the mutually exclusive option will be available in Prodigy?

---

<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 7, 2019, 6:29pm UTC](https://support.prodi.gy/t/is-bath-training-on-labels-mutually-exclusive/1397/5 "2019-07-07T18:29:00Z")

</div>

That’s already been released a while ago as part of Prodigy v1.8.x 🙂

---

<div class="post-metadata">

**Author:** ![gladiator](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/gladiator/32/766_2.png) [@gladiator](https://support.prodi.gy/u/gladiator)\
**Post date:** [July 9, 2019, 2:17pm UTC](https://support.prodi.gy/t/is-bath-training-on-labels-mutually-exclusive/1397/6 "2019-07-09T14:17:12Z")

</div>

I do have v1.8.2 but I dont see any option to make labels mutually exclusive in `textcat.teach`, could you point me towards the latest documentation ?
