I want to run a classification tree using rpart but the variable that I want to predict has a lot of class imbalance:
Behaviour: a b c d e 35 100 32 405 34301
I have downsampled the data for Random Forest (RF) but when I split into 2/3 training and 1/3 test data for the classification tree and then downsample to the minority class, I lose alot of data. I've tried using SMOTE but it seems that only works when there are binary classes. It oversamples "c" and downsamples everything else so that "a" and "b" are around zero in order to bring "e" down to a suitable size. Cost sensitive learning doesn't look to be an option as I can't implement it properly in RF and I want to compare the two. I'd really appreciate any suggestions.