In pandas data frame there are multiple binary features columns with binary values, and the challenge is to identify which column has one-hot labels/values(which column can be a part of the one-hot encoded vector) and which column is an independent feature and not a part of one-hot encoded labels/vector.
The data that I need to clean and preprocess somehow looks like this:
Rows v1 v2 v3 v4 v5 v6 v7 v8 v9 v10 Label
0 1 1 0 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 1 0 0 0 0
2 0 1 0 1 0 0 0 1 0.5 0 0
3 0 0 0 0 0 1 0 0 0 1 0
4 0 0 0 0 1 0 0 0 0 0 1
5 0 0 0 0 0 0 1 0 0 0 1
6 0 0 0 1 0 0 0 0 0 1 1
7 0 0 1 0 1 0 0 0 0.2 0 0
8 0 0 0 0 0 1 0 0 0 1 0
Note: Need to find out a specific combination of columns in which we have one 1 and other zeros in a row which is as there can be some non-hotEncoded/independent binary columns.
By specific combination of columns in which we have one 1 and other zeros in a row, I mean a result/final combination of columns like this, where we have one 1 in a row(by excluding the other binary columns):
v1 v4 v5 v6 v7
1 0 0 0 0
0 0 0 0 1
0 1 0 0 0
0 0 0 1 0
0 0 1 0 0
0 0 0 0 1
0 1 0 0 0
0 0 1 0 0
0 0 0 1 0