I have a dataset with 77 different labels. Each sample has one or more of these labels.

I did some data analysis and found out that the dataset is highly imbalanced - there are a large number of examples that have a particular label, whereas the other labels don't occur so frequently across the data samples.

I'm trying to use SMOTE to synthesize new data samples for the minority labels but apparently, imblearn's SMOTE doesn't support multi-label data. Is there an alternative to SMOTE that I can use for multilabel classification, or should I treat my problem as 77 different binary classification problems, and apply SMOTE on each iteration separately?


2 Answers 2


If you have only one example for certain classes SMOTE won't work. Most of the Machine Learning algorithms won't work either.

There is a technique called One Shot Learning (it is normally used in computer vision) that "Whereas most machine learning-based object categorization algorithms require training on hundreds or thousands of samples/images and very large datasets, one-shot learning aims to learn information about object categories from one, or only a few, training samples/images."

Maybe you could try with one OSL to help you with the classification but normal ML algorithms require more samples to be able to generalize.

  • $\begingroup$ Hi Carlos! Thanks for your answer. Will smote work if I eliminated the classes with only one example? Can I use smote for multilabel classification then? $\endgroup$ Feb 6, 2020 at 9:06
  • 1
    $\begingroup$ I think it is better to try without any oversampling/subsampling method before and then moving forward to using them to see if it increases performance. SMOTE uses synthetic data, so it's a bit weird, but it won't have amazing changes. $\endgroup$ Feb 6, 2020 at 9:09
  • $\begingroup$ Ah, that makes sense. I have a serious shortage of data...the dataset I have itself is too small. I'm looking for ways to really apply ML on the dataset I have, let alone improving accuracy. $\endgroup$ Feb 6, 2020 at 9:38
  • 2
    $\begingroup$ 77 labels it is a lot. You will need at least some data. Without knowing too much, maybe the best way to go is to gather more data or to simplify it and have way fewer labels. $\endgroup$ Feb 6, 2020 at 9:40

If you are looking for data generation in the case of a multilabel dataset there is an algorithm named MLSMOTE. you can have a read


  • $\begingroup$ Please add some more details to the answer in the future and not just a one line description with a link! $\endgroup$
    – Academic
    Jan 4, 2021 at 9:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.