Let's say I have the following samples with their respective multi-label
Where X1,X2,X3,X4,X5,X6
are samples
and Y1,Y2,Y3,Y4
are labels
X1 : {Y2, Y3}
x2 : {Y1}
X3 : {Y2}
X4 : {Y2, Y3}
X5 : {Y1, Y2, Y3, Y4}
X6 : {Y2}
How do I transform to
X1 : y1
x2 : y2
X3 : y3
X4 : y1
X5 : y4
X6 : y3
What I understood is that this approach is how the transformation happens in the Label Powerset method. But, I do not want to classify using this method. I just wanted to convert the labels.
We gave MultiLabelBinarizer
to convert the multi-label to two-class. But this one only creates 0 and 1.