Categorical Variable with too many levels for Decision Tree I am trying to build a decision tree but the problem is I have too many levels on one of my categorical variable. The variable is 'source' - It indicates the source website where the user came from. I want to include this variable in my decision tree. How to deal with the many levels?

I can think of three strategies:

*

*Use a random effects model. This shrinks the predicted outcome for low frequency categories towards the grand mean and is usually the best approach.

*Group all low-frequency categories into "other"

*Classify all low-frequency URLs by category and use the categories rather than the URLs; leave higher-frequencies categories as they are

