# Dataset for multilabel classification

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdataset-for-multilabel-classification%2F136584%3E%5C
**Category:** 🤗Transformers\
**Created:** [January 20, 2025, 8:06pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdataset-for-multilabel-classification%2F136584 "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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJohn6666)%5C
**Post date:** [January 20, 2025, 10:42pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdataset-for-multilabel-classification%2F136584%2F2 "2025-01-20T22:42:35Z")

</div>

I hope this is helpful…

> [@Dataset label format for multi-label text classification](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdataset-label-format-for-multi-label-text-classification%2F14998)%3A
>
> 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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdataset-for-multilabel-classification%2F136584)._
