SMOTE filter not working properly

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

SMOTE filter not working properly

Dear all,

I'm working with a dataset of 18 classes, so you'll guess that it's really imbalanced. As a first attempt at balancing it I've decided to apply SMOTE filter to those classes with less than X instances. The problem is that, although some classes get filtered correctly, the filter doesn't get applied to some classes that should, and it also gets applied to some other classes that shouldn't. 

I guess that the problem could be with the value-index SMOTE's parameter. I've got a HashMap that associates every class name with the number of instances that are labeled with that class. In order to apply SMOTE to the appropiate classes, I iterate over the entries of the HashMap and check if the associated value is lower than X. If it is, I get the value-index parameter like this: 

String valueIndex = set.classAttribute().indexOfValue(className).toString()

Then I set the value-indexnearest-neighbors and percentage parameter for the  SMOTE filter and I apply it using the Filter's class method useFilter(smote)

I've debugged the code and already checked with the set.classAttribute().value(valueIndex) that valueIndex is the index of the class which has got less than X samples, so maybe I am not understanding correctly what value-index SMOTE's parameter is. Or maybe the problem is elsewhere. 

Thank you for your time,


Wekalist mailing list
Send posts to: [hidden email]
To subscribe, unsubscribe, etc., visit
List etiquette: