# Classification with GBM in R and imbalanced class sizes

I'm dealing with a supervised binary classification issue. I'd like to use the GBM package to classify individuals as uninfected/infected. I have 15 times more uninfected than infected individuals.

I was wondering if GBM models suffer in the case of imbalanced class sizes? I didn't find any references answering this question.

I tried to adjust the weights by assigning a weight of 1 to the uninfected individuals and a weight of 15 to the infected, but I obtained poor results.

-

I think your data is similar to Secom data on which I'am trying to work and in fact I'm also facing lot of issues. What I have tried so far is

• UpSampling of minorities, and
• Random Forest

I've also tried 1-Class SVM which has given better results as compared to others like adaboost, Random Forest. You can try that as well.

And I can see you've asked this question 1 year back so if you've found the best way then kindly post it here so that I can get help from it to get better accuracy.

-

In my experience, GBM does indeed suffer from imbalanced class sizes. I have had good success using SMOTE sampling, which creates synthetic data while oversampling the minority class. You can find it in the DMwR package.

-