A robust algorithm for extending samples with rare labels in multi-label datasets.