I am building a random forest model in R. Based on my research I (hope to) have come up with quite some understanding about how they work, and more importantly when they work.

I simply would like to see my understanding of RF-models cross-validated here.

So here we go (true or false?):

  • scaling is not necessary in Random Forest models.
  • when dealing with imbalanced data, one could downsample/upsample/use weights. In package randomForest however, the option classwt seems to be unreliable? Therefore I simply downsample my data (50/50) using package Unbalanced. In my final model I will downsample and build the forest K times and take the average of the predictions. Is this wise?
  • Random Forests have little problems with highly correlated variables. I have many ideas for new features and would like to include all of them at once and based on importance (MeanDecreaseGini) optionally decide to leave some out. But the correlation between predictors will not influence performance? in other words: the model with extra features will perform at least similar to the one with less variables?
  • $\begingroup$ @myself: downsampling in randomForest package happens much easier with: sampszize=rep(length(minorityClass,2) (in randomForest) The rest of the questions remain unanswered. $\endgroup$ Commented Jun 28, 2014 at 9:26

1 Answer 1

  1. Scaling is not required; RF training is invariant to all combinations of monotonic transformations of predictors.
  2. classwt is not reliable; RF and unbalanced data is long story, try browsing the site or ask a more detailed question.
  3. RF shouldn't have any problems with correlated predictors (provided that you have enough trees). Optimizing the model by removing variables with smallest DecreaseGini may be unstable and thus pretty tricky -- remember that you need to do cross-validation and a proper test to detect significant effect of some variable on a model performance, importance measures on they own are not enough.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.