The same question from another user can be found here
Is it helpful to have monotonic features when using a random forest for classification?
To rephrase, my question is:
Let's say we have a feature, for example City, with 4 categories Missing, A, B and C.
And the corresponding event rates are Missing: 10%, A: 5%, B: 20%, C: 2%.
Is it better to rearrange them and encode them so that the feature is monotonic?
I.e.
- Feature Encoding 1 2 3 4
- Corresponding category C A Missing B
- Event Rate 2% 5% 10% 20%
I understand that random forest can deal with nonlinear patterns but here it is a matter of encoding whether the feature is or not monotonic. So the question is, if leaving the feature as it is do we introduce noise? For example it is somehow forced to split at first [Missing,A,B] all together and C separately and then have another split etc while if it is introduced with the monotonic encoding the splits will make more sense?