1
votes

I have a highly imbalanced data and want to up-sample the minority class to improve accuracy (the minority class is the object of interest).

I tried using the "sampsize" option in the "randomForest" function - but it only allows for down-sampling. I read someplace, the "classwt" option can be used - but i am not sure how to use it.

Can anyone suggest a way to run Random Forest in R by up-sampling the minority class (using the "randomForest" library or other such libraries).

Thanks.

1
will stackoverflow.com/questions/8704681/… moves you a bit further? - xhudik
@xhudik : i had already gone through the link before posting. Most of the suggestions are on down-samlping the majority class and use a reduced data size. i want to keep the size of the dataset same but with a balanced configuration of the factors (appx. 50:50) - amvo
hmm, so no advice from my side unfortunately ... - xhudik

1 Answers

0
votes

The simplest approach is to just duplicate the data of the minority class enough, but then you lose the OOB estimates.

What you want do do directly does not appear to be implemented, see also this question.