I have a dataset that has a multi-labeled data. There is a total of 20 labels (from 0 to 20) which has an imbalance distribution among them. Here is an overview of the data:
|id |label|value |
|-----|-----|------------|
|95534|0 |65.250002088|
|95535|18 | |
|95536|0 | |
|95536|0 |100 |
|95536|0 | |
|95536|0 |53.68547236 |
|95536|0 | |
|95537|1 | |
|95538|0 | |
|95538|0 | |
|95538|0 | |
|95538|0 |656.06155202|
|95538|0 | |
|95539|2 | |
|5935 |0 | |
|5935 |0 |150 |
|5935 |0 |50 |
|5935 |0 |24.610985335|
|5935 |0 | |
|5935 |0 |223.81789584|
|5935 |0 |148.1805218 |
|5935 |0 |110.9712538 |
|34147|19 |73.62651909 |
|34147|19 | |
|34147|19 |53.35958016 |
|34147|19 | |
|34147|19 | |
|34147|19 | |
|34147|19 |393.54029411|
I am looking to oversample the data and make a balance between the labels. I came across some methods like SMOTE
and SMOTENC
but they are all required splitting the data into train and test set and they are not working with sparse data. Is there any way that I can do this on the entire data in the pre-processing step before splitting?