Balancing a multilabel dataset

Balancing the data in a multi-label use case is not trivial and this post describes some methods for a balanced sampling.