I am aware that categorical variables should be one hot encoded before modeling with random Forests. But I am not entirely sure why.
Lets say we have a predictor categorical variable with 7 levels. The tree should be able to find similarities/differences within this variable if it is numerically encoded. Why do we have to one hot encode categorical variables?
How can I simulate a regression to showcase the difference?