I have an imbalanced dataset. I am looking to under-sample. Even though, the oversampling process takes less time, the model training takes a lot of time. I have taken a look at imbalanced-learn website. There are several under sampling methods. I am looking at method that tries to undersample the classes with much as possible information intact. I tried .ClusterCentroids()
methods and found it takes way too long to balance the classes.
I have tried other methods that have been mentioned in the website. However, even with sampling_strategy
to equal values eg: sampling_strategy={0: 2000, 1: 2000, 2: 2000}
The resulting dataset is not balanced. Such as in .CondensedNearestNeighbour()
and .AllKNN()
methods.
Would anyone be able to help me create a class balanced dataset using these methods.
Thanks
Michael