Do I Need to Normalize (Or Scale) Data for Randomforest (R Package)

Is normalization necessary for RandomForest?

1) No! Feature normalization isn't necessary for any tree-based classifier.

2) Generally speaking, normalization should be done on all features not just numerical ones.

3) In practice it doesn't make much difference. However, the correct practice is to identify the min and max values of each feature from the training set and then normalize the features of both sets according to those values.

4) Yes, afterwards any sample that needs to be classified should be processed with exactly the same way as you did during training.

Should I need to normalize (or scale) the data for Random forest (drf) or Gradient Boosting Machine (GBM) in H2O or in general?

You don't need to do anything to your data when using H2O - all algorithms handle numeric/categorical/string columns automatically. Some methods do internal standardization automatically, but the tree methods don't and don't need to (split at age > 5 and income < 100000 is fine). As to whether it's "harmful" depends on what you're doing, usually it's a good idea to let the algorithm do the standardization, unless you know exactly what you are doing. One example is clustering, where distances depend on the scaling (or lack thereof) of the data.



Related Topics



Leave a reply



Submit