# Dataset for multilabel classification

**URL:** <https://discuss.huggingface.co/t/dataset-for-multilabel-classification/136584>\
**Category:** 🤗Transformers\
**Created:** [January 20, 2025, 8:06pm UTC](https://discuss.huggingface.co/t/dataset-for-multilabel-classification/136584 "2025-01-20T20:06:39Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [January 20, 2025, 10:42pm UTC](https://discuss.huggingface.co/t/dataset-for-multilabel-classification/136584/2 "2025-01-20T22:42:35Z")

</div>

I hope this is helpful…

> [@Dataset label format for multi-label text classification](https://discuss.huggingface.co/t/dataset-label-format-for-multi-label-text-classification/14998):
>
> Hi, I’ve been able to train a multi-label Bert classifier using a custom Dataset object and the Trainer API from Transformers. The Dataset contains two columns: text and label. After tokenizing, I have all the needed columns for training. For multi-label classification I also set model.config.problem\_type = "multi\_label\_classification", and define each label as a multi-hot vector (a list of 0/1 values, each corresponding to a different class). So for instance, given the task consists in assig…

> **[Multi-Label Classification Model From Scratch: Step-by-Step Tutorial](https://huggingface.co/blog/Valerii-Knowledgator/multi-label-classification)**
>
> A Blog post by Valerii Vasylevskyi on Hugging Face

---

_[View the full topic](https://discuss.huggingface.co/t/dataset-for-multilabel-classification/136584)._
