Search code examples
rcmachine-learningrandom-forest

Modification of Random Forest to always evaluate some feature(s) at every split


I am trying to change the functionality of a random forest classifier. While usually features are selected at random for each split, I want one specific feature to be evaluated at each split. I know this can impact performance but i want to try out whether this is a good idea in a very specific use case. So the result of the adaptation shall be: features used for splitting are selected at random (as usual) but one specific feature (say index 15) is always considered (not necessarily used).

I don't know any packages that allow that out of the box. It's there one, or maybe a simple workaround to achieve the same effect?


Solution

  • The {ranger} package offers this option via always.split.variables. The package is very fast as well.